POST /excel/generate produces .xlsx workbooks from a single prompt.
The agent can write raw data, apply formulas, style headers, freeze
panes, create charts, and build multi-sheet workbooks in one call.
What the Excel agent can do
Ordered roughly from “used in almost every workbook” to specialized:- Multi-sheet workbooks — create, rename, reorder, delete sheets; set which sheet is active when the workbook opens.
- Data entry — bulk writes, per-cell updates, append rows at the bottom of existing data, delete rows or columns in place.
- Formulas — cross-sheet references, aggregations (
SUM,AVERAGE,MAX,MIN,COUNT,COUNTIF,AVERAGEIF), lookup functions (VLOOKUP,INDEX/MATCH), statistical (STDEV), and computed columns that derive from other columns. - Number formatting — currency, percentage, date, custom patterns, thousand separators, per-column or per-range.
- Cell and range styling — fonts, sizes, bold/italic/underline, fill colors, borders (per-side), alignment, wrap, merge cells, cell-level hyperlinks.
- Conditional formatting — thresholds, color scales, data bars, icon sets — ideal for status columns, score highlighting, KPI dashboards.
- Charts — column, bar, line, pie, doughnut, area, scatter, bubble, combo, stock, radar. Automatic axis titles, legends, data labels; chart sits on the same or a different sheet.
- Pivot-style summary tables — aggregated totals, averages, or counts grouped by one or more columns, with optional totals rows.
- View settings — freeze panes (header rows / left columns), auto-filters, column widths, row heights, hide/show rows or columns.
- Tables and sorting — apply sort on a range, find-and-replace values, manipulate text columns (upper/lower/title case, split, concat).
- Images — embed uploaded images anchored to a cell or range, replace / delete existing images.
- Data validation — dropdowns, numeric ranges, custom formulas.
- Sheet protection — lock a sheet or specific ranges.
Quickstart
.xlsx with headers, rows, formulas for totals and averages,
and at least one chart.
Common patterns
Working from an uploaded CSV
Upload the source first, then reference it in the prompt:Editing an existing workbook
Passinit_file and the agent edits in-place instead of creating fresh:
Financial models
For serious financial modeling (three-statement, DCF, LBO), hint the intent and the agent loads a specialized template:- Linked formulas across sheets (
=Assumptions.C5) - Balance check (Assets = Liabilities + Equity)
- Cash reconciliation (CFS ending cash = BS cash)
- Input cells styled yellow for clarity
- Number formatting per column type
Analyze without editing
If you just want to ask a question about an uploaded workbook and get a JSON answer back (no file produced), usePOST /excel/analyze:
Resuming and iterating
Passrun_id to build incrementally:
Things the agent handles well
- Formulas (cross-sheet,
INDEX/MATCH,VLOOKUP, aggregations) - Number formatting (currency, percentage, date, custom)
- Conditional formatting (status columns, score thresholds)
- Charts (column, bar, line, pie, combo, stock, bubble)
- Pivot-style summaries (aggregated totals, averages)
- Title banners with merged cells + fills
- Freeze panes, filters, column widths
Things to be aware of
- Output cap: 200 rows per
WRITE_DATAbefore the agent splits into batches. Large data imports should stream viadata_sourcesrather than embedding in the prompt. - No macros / VBA. Cell-level formulas only.
- Agent may choose different chart types than you’d expect if the prompt is ambiguous. Specify (“use a bar chart”) if it matters.
- Placeholder data gets generated when the prompt asks for data the
agent doesn’t have. It’ll note the choice in the
summaryfield.
