Have an agent build a spreadsheet the user can check
Model-generated workbooks, reviewed in the browser, exported as real xlsx.
The problem
Asking a model for "a budget spreadsheet" gets you a wall of CSV in a chat window. The user cannot check the formulas, cannot fix the one wrong cell, and cannot hand the result to a colleague who expects a real file.
You need the model's output to land somewhere a person can inspect and correct before it becomes a deliverable — and then to leave as a genuine xlsx, not a comma-separated approximation of one.
What you are building
Live surfaces, not screenshots — every one composed from the same components you would install.
Live workbook
The real SheetWorkbook with working SUM formulas — the surface an agent fills, not a picture of one.
The code
// The sheet bridge exposes the workbook as controlled state, so an agent edits
// the SAME surface the human is looking at -- formulas recalculate live, and
// nothing has to be re-opened to see the result.
registerSheetsBridge(server, {
adapter: {
getWorkbook: () => workbook,
setWorkbook,
},
});// holy-sheet writes real xlsx from the same data -- no headless browser, no
// spreadsheet application on the server. The Node twin (holy-sheet-js) writes
// the identical file if your backend is not PHP.
HolySheet::fromArray($rows)->write(storage_path('app/q1-sales.xlsx'));How to solve it
Put a real workbook on the page
Render the sheet surface with the workbook in controlled state, so both the human and the agent write to the same object.
Run thisbash npm install @particle-academy/fancy-sheetsBridge it
Register the sheets bridge to expose the
sheet_*tools. The agent writes cells and ranges through them, which is a normal state update — the human keeps editing the whole time.Let the human correct it
This is the step that makes the pattern worth it. The agent produces a draft; the user fixes the two cells it got wrong. Neither has to redo the other's work.
Write a real file server-side
Export through the xlsx writer that matches your runtime — they are ports of each other, so the same workbook produces the same file whichever side runs it.
Run thisbash composer require particle-academy/holy-sheet # or, on Node: npm install @particle-academy/holy-sheet
