formulon-mcp
v0.12.0Excel MCP server for AI agents: open, edit, recalculate and save .xlsx / .xlsb workbooks without Excel.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
formulon_version Formulon version
Return the loaded Formulon engine version.
formulon_eval_formula Evaluate formula
Evaluate one Excel formula with Formulon. With sessionId, evaluates read-only against the open workbook (resolving refs, defined names, and ROW()/COLUMN() anchored at the given cell) without mutating it.
| Parameter | Type | Description |
|---|---|---|
formula * | string | Excel formula, with or without a leading '='. |
col | integer | Anchor column for ROW()/COLUMN() and relative refs (session mode). |
row | integer | Anchor row for ROW()/COLUMN() and relative refs (session mode). |
sessionId | string | Evaluate against this open workbook session instead of a fresh workbook. |
sheet |
formulon_open_workbook Open workbook session
Create an in-memory workbook session from an existing .xlsx/.xlsb file or a new default workbook. Anything the reader could not decode is reported in the session's `loadLosses`.
| Parameter | Type | Description |
|---|---|---|
path | string | Optional .xlsx or .xlsb path. Omit to create a new default workbook. |
profile | string | Excel profile the session evaluates with (number/date text, TEXT, collation, code page); defaults to FORMULON_MCP_PROFILE, else win-365-en_US. A new workbook is also created as Excel creates it in tha… |
sessionId | string | Optional stable session id; defaults to a UUID. |
formulon_list_sessions List workbook sessions
List currently open in-memory workbook sessions.
formulon_close_workbook Close workbook session
Close an in-memory workbook session and release its native workbook handle.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string |
formulon_inspect_session Inspect session workbook
Inspect an open workbook session, optionally including sparse non-empty cells.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
includeCells | boolean | |
maxCellsPerSheet | integer |
formulon_recalc_session Recalculate session
Recalculate an open workbook session. `circularReferences` lists every cell (Sheet!A1) that sits in an unresolved circular reference, where Excel warns and names only one of them; a cell that only reads a cycle is not listed, and nothing is listed under iterative calculation.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string |
formulon_find_cells Find cells
Search text cell values and/or formula text in an open workbook session.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
sessionId * | string | |
matchCase | boolean | |
maxResults | integer | |
regex | boolean | |
sheet | ||
target | string | |
wholeCell | boolean |
formulon_replace_cells Replace cells
Replace matching text cell values and/or formula text in an open workbook session.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
replacement * | string | |
sessionId * | string | |
matchCase | boolean | |
maxReplacements | integer | |
maxResults | integer | |
recalc | boolean | |
regex | boolean | |
sheet | ||
target | string | |
wholeCell | boolean |
formulon_inspect_layout Inspect workbook layout
Return stable cell, layout, merge, row/column, protection, tab visibility (`visible`, `hidden` or `veryHidden`), and optional style data for one or all sheets. With includeStyles, formattedCells lists the cells that carry a format but no content.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
includeCells | boolean | |
includeStyles | boolean | |
maxCells | integer | |
sheet |
formulon_detect_regions Detect workbook regions
Detect table-like regions, label-value pairs, and total-like regions with rule-based evidence.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
maxCells | integer | |
sheet |
formulon_analyze_workbook Analyze workbook
Classify workbook shape such as invoice, list, report, schedule, or form using deterministic features and evidence.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
includeEvidence | boolean | |
maxCellsPerSheet | integer |
formulon_set_cells Set session cells
Apply cell mutations to an open workbook session. Cells may use A1 refs or zero-based row/col.
| Parameter | Type | Description |
|---|---|---|
mutations * | array | |
sessionId * | string | |
recalc | boolean |
formulon_set_range Set range block
Write a 2D block of values starting at an anchor cell. Each element's JSON type picks the cell type: number, boolean, or string. Use {"f":"=SUM(A1:A3)"} for a formula, {"blank":true} to clear the content of a cell (a cell left with neither content nor a format of its own stops existing), and null to leave it untouched. Far more compact than set_cells for tables.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
start * | string | Anchor (top-left) A1 cell, for example Sheet1!B2 or B2. |
values * | array | Row-major 2D array of cell values. |
recalc | boolean | |
sheet | Sheet used when start has no Sheet!-prefix; defaults to the first sheet. |
formulon_sheet_operation Sheet operation
Add, remove, rename, or move a sheet in an open workbook session.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
fromIndex | integer | Source index for move. |
index | integer | Sheet index for remove/rename. |
name | string | Sheet name for add. |
newName | string | New sheet name for rename. |
toIndex | integer | Destination index for move. |
formulon_set_defined_name Set defined name
Add, replace, or remove a defined name. Without `sheet` the name is workbook-scoped; with it the name is local to that sheet. Print settings (_xlnm.Print_Area, _xlnm.Print_Titles) must be sheet-scoped — Excel ignores a workbook-scoped one without reporting an error. A null formula removes it. Replacing a formula keeps the name's comment and hidden flag unless they are given.
| Parameter | Type | Description |
|---|---|---|
formula * | string | null | Formula with or without '='; null removes the name. |
name * | string | |
sessionId * | string | |
comment | string | null | Note shown in Excel's Name Manager; null clears it. |
hidden | boolean | Hide the name from Excel's Name Manager. |
sheet | Scope the name to this sheet. Omit for workbook scope. |
formulon_edit_structure Edit rows or columns
Insert or delete rows/columns in an open workbook session.
| Parameter | Type | Description |
|---|---|---|
count * | integer | |
operation * | string | |
sessionId * | string | |
start * | integer | |
sheet |
formulon_set_sheet_view Set sheet view
Set sheet zoom, frozen or split panes, scroll origin, tab visibility, formula or outline-symbol display, or make the sheet the active one. A split replaces a freeze and the other way round. Excel refuses to hide the last visible sheet, and hiding the active sheet activates the next visible one.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
active | boolean | Make this the sheet Excel opens on; it must be visible. |
freezeCols | integer | |
freezeRows | integer | |
hidden | boolean | Two-state tab visibility; cannot state veryHidden. |
sheet | ||
showFormulas | boolean | Show formula text in cells instead of results. |
showOutlineSymbols | boolean | Show the outline gutter's group expand/collapse symbols. |
splitX | number | Unfrozen split position from the left edge, in points; 0 removes it on that axis. |
splitY | number | Unfrozen split position from the top edge, in points; 0 removes it on that axis. |
topLeft | string | First visible cell of the scrolled view on this sheet, for example A100. |
visibility | string | Three-state tab visibility. Excel leaves a veryHidden sheet out of its Unhide dialog. |
zoom | integer |
formulon_get_cell Get cell
Get one cell from either an open session or a workbook path. Pass exactly one of `sessionId` or `path`; A1 refs and sheet names work for both. Date/currency/percent cells carry a decoded `formatted` string alongside the raw value; formatted numbers also carry `text`, exactly what Excel displays (`textStatus` flags overflow or an invalid format). A formula cell whose value was not recalculated since its inputs changed (manual or automatic-except-tables calculation with `recalc` false) carries `stale: true`; saving the session computes such formulas first, which clears the mark, unless the workb…
| Parameter | Type | Description |
|---|---|---|
a1 | string | |
col | integer | Zero-based column (when a1 is omitted). |
path | string | |
recalc | boolean | Recalculate before reading. With `path` and false, formulas read the values the file cached, as Excel shows them when it opens the file in Manual calculation. |
row | integer | Zero-based row (when a1 is omitted). |
sessionId | string | |
sheet |
formulon_get_range Get range
Get a rectangular A1 range from an open workbook session. Output is sparse (blank cells omitted) and capped at maxCells. Cells with a date/currency/percent number format carry a decoded `formatted` string (for example an ISO date) alongside the raw value; formatted numbers also carry `text`, exactly what Excel displays. A formula cell whose value was not recalculated since its inputs changed (manual or automatic-except-tables calculation with `recalc` false) carries `stale: true`; saving the session computes such formulas first, which clears the mark, unless the workbook's `calcOnSave` is off.
| Parameter | Type | Description |
|---|---|---|
range * | string | A1 range, for example Sheet1!A1:C10 or A1:C10. |
sessionId * | string | |
includeFormulas | boolean | Include each cell's formula text (empty for constants). |
maxCells | integer | |
recalc | boolean | Recalculate before reading. |
sheet | Sheet used when range has no Sheet!-prefix; defaults to the first sheet. |
formulon_save_session Save session workbook
Save an open workbook session as .xlsx or .xlsb. XLSB output writes PivotTables, including one built in the session, and the custom views of a workbook opened from .xlsx; anything the binary format cannot hold is left out and counted in `losses.deferredFeatures`, so inspect `losses` before relying on the file. An .xlsb save of a workbook holding something the format cannot store at all, such as a protected range whose security descriptor the format cannot hold, fails with `IoFeatureNotWritable` and writes nothing. Under manual calculation the save first computes formulas left pending, unless t…
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
outputPath | string |
formulon_session_metadata Session metadata
Read broad workbook metadata such as registered functions or external links.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
sessionId * | string |
formulon_merge_operation Merge operation
List, add, remove, remove by index, or clear merged ranges on a sheet.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
index | integer | |
range | object | |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. |
formulon_comment_operation Comment operation
List, get, set, or remove a cell comment, or show/hide it. A shown comment stays open on the sheet; a hidden one appears on hover.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
author | string | |
col | integer | |
row | integer | |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
text | string | |
visible | boolean | For visibility: true shows the comment, false hides it. |
formulon_hyperlink_operation Hyperlink operation
List, add, remove, remove by index, or clear hyperlinks on a sheet. add and remove take one cell at row/col, or the rectangle through lastRow/lastCol. An added link replaces a link covering exactly the same cells and is otherwise added beside the others, overlapping ones included; every cell it covers takes Excel's Hyperlink cell style (the font becomes the Normal font underlined in theme colour 10, other formatting is kept), and an empty top-left cell receives display, else the target, else the location, as text. remove deletes every link that intersects the cells, each one whole, and resets…
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
col | integer | |
display | string | |
index | integer | |
lastCol | integer | Inclusive last column of the cells to add or remove; defaults to col. |
lastRow | integer | Inclusive last row of the cells to add or remove; defaults to row. |
location | string | In-workbook destination such as Sheet2!A1, used when target is omitted. |
row | integer | |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
target | string | null | External URL; omit (or null) for an in-workbook link. |
tooltip | string |
formulon_validation_operation Validation operation
List, add, remove by index, or clear data validations on a sheet. A listed validation uses the member names add takes, so it can be added back as listed. An omitted boolean field defaults to false, so a rule that should accept empty cells has to spell allowBlank: true; showDropDown is the only field that defaults to true.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
index | integer | |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
validation | object | DataValidationInput (see formulon_workbook_api describe Sheet.addValidation): allowBlank, showInputMessage, showErrorMessage, showInCellDropdown (each default true), formula1, formula2, errorTitle, er… |
formulon_conditional_format_operation Conditional format operation
List, add, remove by index, clear, or evaluate conditional format rules. A listed rule uses the member names add takes (type, operator, thresholds, icon sets), so it can be added back as listed.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
firstCol | integer | |
firstRow | integer | |
index | integer | |
lastCol | integer | |
lastRow | integer | |
rule | object | ConditionalFormatInput (see formulon_workbook_api describe Sheet.addCfRule). Common keys: priority, stopIfTrue, id, and format (a CellFormatPatch) or dxfIndex for the rules that format cells; formula1… |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
todaySerial | number | Excel date serial in the workbook's date system that time-period rules compare with; omitted, the pinned clock, else today. |
formulon_image_operation Image operation
List a sheet's drawing objects (pictures, shapes, charts) with A1 anchors and sizes, get a picture's bytes (returned as an image, optionally written to outputPath), insert a PNG/JPEG/GIF/BMP file anchored at a cell, move/resize a picture or chart in place, change the stacking order, or remove a picture or chart; shapes are edited with formulon_shape_operation. insertInCell, getInCell and removeInCell place, read and remove the PNG/JPEG picture held in the anchor cell itself (Excel's Place in Cell), which sizes with the cell. Placing replaces whatever the cell held, a formula included, and form…
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
anchor | string | Top-left cell on the selected sheet, for example B2; required for insert, optional for move. For the InCell operations, the cell that holds the picture. |
anchorKind | string | oneCell keeps the size when rows/columns resize; twoCell stretches with them. Insert defaults to oneCell; move keeps the current kind. |
description | string | Alternative text. |
height | object | |
index | integer | For reorder: target position in list order, which is back to front (0 is the back). |
name | string | |
objectId | integer | Drawing object id from list; required for get, move, reorder and remove. |
offsetX | object | Offset from the anchor cell's left edge. |
offsetY | object | Offset from the anchor cell's top edge. |
outputPath | string | For get and getInCell: write the image bytes to this path. |
path | string | Image file to insert; required for insert and insertInCell. |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
width | object |
formulon_trace Trace dependencies
Read precedents, dependents, or spill info for a cell. Results carry A1 references (with sheet names), not raw indices. spillInfo returns spill null when the cell is in no dynamic-array spill range and is no PivotTable report's anchor, else { blocked, cause, anchor, rows, cols, range }. A report is read only at its anchor, and its range includes its page-field rows above the anchor. At the anchor of a dynamic array refused with #SPILL! or of a blocked report, blocked is true, range is the rectangle it needs clipped to the sheet, and cause is occupied, merged or beyondEdge; cause is null when b…
| Parameter | Type | Description |
|---|---|---|
col * | integer | Zero-based column of the cell to trace. |
operation * | string | |
row * | integer | Zero-based row of the cell to trace. |
sessionId * | string | |
depth | integer | |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. |
formulon_dimension_operation Column/row dimension operation
List column-width/row-height overrides, set width/height, reset it to the sheet default (keeping hidden, outline and style state), or set hidden, outline level, or the collapsed flag of the outline group a row/column summarises. Collapsing only marks the summary; hide the detail rows/columns with the hidden operation, as Excel stores both. Columns act on an inclusive [first, last] span; rows act on an inclusive [row, row] span. Column sizes default to Excel's stored character width, padding included as `<col width>` holds it (a default Calibri 11 column is 9.140625); row sizes default to point…
| Parameter | Type | Description |
|---|---|---|
axis * | string | |
operation * | string | |
sessionId * | string | |
collapsed | boolean | Collapsed flag for the 'collapsed' operation. |
first | integer | Zero-based first column index (column axis). |
hidden | boolean | Hidden flag for the 'hidden' operation. |
includeGeometry | boolean | For list, include derived points/pixels/mm geometry for each stored override. |
last | integer | Zero-based last column index; defaults to first (column axis). |
level | integer | Outline level for the 'outline' operation. |
row | integer | Zero-based row index (row axis). |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
size | number | Column width or row height for the 'size' operation. |
unit | string | Size unit: column defaults to chars, row defaults to pt; px and mm convert through 96-DPI display points. |
formulon_build_document Build a document from blocks
Lay out a document as a vertical stack of blocks — title, text, fields, table, summary, spacer — and write it in one call. Positions, ruling, number formats, column widths, merges and the print area are all resolved from the layout, so no row arithmetic is needed. Blocks reference each other by name: a table column registers as {table.<header>} over its body range, and a fields or summary item registers under its label, so "=SUM({table.Amount})" and "={Subtotal}+{Tax}" bind to the right cells once the layout is known. The response maps every block and name to A1 so the result can be refine…
| Parameter | Type | Description |
|---|---|---|
blocks * | array | |
sessionId * | string | |
print | string | Named page setup; also sets the print area to the document's extent. |
repeatTableHeader | boolean | Repeat the first table's header row on every printed page. Defaults to true. |
sheet | Sheet used when `start` has no Sheet!-prefix; defaults to the first sheet. | |
start | string | Top-left anchor, for example Sheet1!B2. Defaults to B2, leaving a margin. |
theme | object | |
width | integer | Document width in columns; defaults to the widest table's column count. |
formulon_style_range Style a range
Apply fonts, fills, borders, number formats, and alignment across an A1 range, materializing blank cells so an empty ruled box renders. Whole columns (B:D) or rows (3:5) are styled as columns or rows, so cells written there later inherit the style. Each property is a delta: cells keep whatever the style does not state, so ruling a table does not undo the number format already on its amount column. Style in passes — the grid over the whole table, then the header row, then a total cell.
| Parameter | Type | Description |
|---|---|---|
range * | string | A1 range, single cell, whole columns or whole rows, for example Sheet1!B2:F20, B2, C:C or 1:1. |
sessionId * | string | |
style * | object | |
baseOn | string | Apply deltas to each cell's current style, or start from the workbook default. |
sheet | Sheet used when range has no Sheet!-prefix; defaults to the first sheet. |
formulon_default_font Workbook default font
Read or redeclare the workbook default font — the one every cell that was never styled resolves to. A new workbook is seeded with Excel's Calibri 11, which renders Japanese text in a fallback face, so a Japanese document should declare its own default once instead of styling every cell. Omit `font` to read. Stating a `name` also cuts the theme link a loaded workbook's base font carries, since a theme-linked font is re-resolved from the theme rather than keeping the name.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
font | object | Properties to change; anything omitted keeps its current value. Omit to read. |
formulon_theme_operation Theme operation
Apply a .thmx theme file to the workbook, replacing its theme colours and fonts, or save the workbook's theme as a .thmx file. On save, fonts linked to the theme take the new theme's face for the profile's script; column widths, row heights and charts are left as they are. Only the default theme of a .thmx is applied, and a file that is not a theme fails without changing the workbook. To undo an apply, save the theme first and apply that file again. Both operations report the resulting theme colours.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
path * | string | The .thmx file to apply, or the file to write on save. |
sessionId * | string |
formulon_print_settings Print settings
Read or set a sheet's print settings: page setup, margins, print options, header/footer, print area, print titles, and manual page breaks. Omit every setting to read. Reads report the resulting pageCount and a `layout` (paper, margins in points, scale, page order, break flags, per-page A1 ranges), so a page layout can be checked without saving the file.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
colBreaks | array | Zero-based columns each manual break precedes. Replaces the sheet's breaks. |
headerFooter | object | Section text uses Excel's own codes — &L/&C/&R pick the section, &P the page number, &N the page count, &D the date, and && a literal ampersand (for example '&C&"MS Gothic"Invoice &P/&N'). Each sect… |
headerFooterXml | string | null | Raw <headerFooter> fragment; null removes it. |
margins | object | Page margins in inches. |
pageMarginsXml | string | null | Raw <pageMargins> fragment; null removes it. |
pageSetup | object | |
pageSetupXml | string | null | Raw <pageSetup> fragment; null removes it. |
printArea | string | null | Comma-separated A1 ranges, for example "A1:F40" or "A1:B10,D5:E20". null removes the print area. |
printOptions | object | |
printOptionsXml | string | null | Raw <printOptions> fragment; null removes it. |
printTitles | object | Rows and columns repeated on every printed page. Both null removes them. |
rowBreaks | array | Zero-based rows each manual break precedes. Replaces the sheet's breaks. |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
sheetPrXml | string | null | Raw <sheetPr> fragment; null removes it. |
formulon_function_lookup Function and locale lookup
List functions, read name/arity/availability metadata, translate a function name or a whole formula between the stored English form and a profile's spelling (a formula's references in A1, or in the profile's R1C1 with r1c1), or read a profile's locale facts (separators, boolean names, date order, currency, error names).
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
baseCol | integer | Zero-based column that R1C1 relative references are measured from; given together with baseRow. |
baseRow | integer | Zero-based row that R1C1 relative references are measured from; given together with baseCol. A relative reference with no base fails. |
formula | string | Formula text for localizeFormula and canonicalizeFormula. |
name | string | Function name for metadata, localize and canonicalize. |
profile | string | Profile to translate into or describe; defaults to the session's profile. |
r1c1 | boolean | For localizeFormula and canonicalizeFormula: spell references on the profile side in R1C1, with the profile's row/column letters and brackets (de Z(-1)S(1), es F[-1]C[1]); omitted keeps A1. |
formulon_workbook_call Call a Formulon engine method
Low-level access to the installed Formulon engine for features no task tool covers. `target` names the object the method belongs to: a handle kind (Workbook, Sheet, Table, Pivot, PivotCache, Chart, ...) and the key of each accessor on the way, or Formulon for the module functions of the engine (collation, locale facts, formula translation), for example { kind: "Pivot", sheet: 0, pivot: "Sales" }. Use formulon_workbook_api first: each method it lists carries its target kind and keys, its signature, input records and enum values. Raw bytes, callbacks and saving are not available here. Example: a…
| Parameter | Type | Description |
|---|---|---|
method * | string | Method name on the target, for example listMerges on a Sheet. |
sessionId * | string | |
args | array | Positional JSON arguments passed to the method. |
target | object | The handle the method belongs to: { kind } plus that kind's keys as formulon_workbook_api lists them. Omitted, the workbook. |
formulon_inspect_workbook Inspect workbook path
Load an xlsx or xlsb workbook path and return a one-shot summary.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to an .xlsx or .xlsb workbook. |
includeCells | boolean | |
maxCellsPerSheet | integer | |
profile | string | Excel profile a recalc evaluates with; defaults to FORMULON_MCP_PROFILE, else win-365-en_US. |
recalc | boolean | Recalculate before reading. False reads the values the file cached, as Excel shows them when it opens the file in Manual calculation. |
formulon_update_workbook One-shot workbook update
Create or load a workbook, apply zero-based cell mutations, recalculate, and save as .xlsx or .xlsb. Inspect returned losses; use XLSX to preserve authored tables, pivots, print settings, and comments.
| Parameter | Type | Description |
|---|---|---|
mutations * | array | |
outputPath * | string | |
inputPath | string | |
profile | string | Excel profile the workbook evaluates with; a new workbook is also created as Excel creates it in that locale. Defaults to FORMULON_MCP_PROFILE, else win-365-en_US. |
recalc | boolean |
formulon_workbook_api Discover Formulon Workbook API
Search or describe the installed Formulon Workbook methods. This tool is session-free and returns signatures, source documentation, read/write access, and referenced TypeScript declarations for AI callers.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum methods to return (capped at 100). |
method | string | Exact Workbook method name for the describe operation. |
offset | integer | Zero-based result offset. |
operation | string | |
query | string | Case-insensitive substring matched against method names, signatures, and docs. |
formulon_table_operation Worksheet table operation
List, create, update, or remove a native Excel worksheet Table. Without column names, create names the columns as Excel does: from the header row, a blank header as Column1 and a repeated one numbered (Qty, qty2); without a header row Column1..n. A totals row turned on for the first time gets Excel's defaults (a Total label in the first column; in the last a sum when every data cell is a number, else a count). This is structured Table metadata, not visual formatting. Renaming a table on update rewrites the structured references to it. Table indexes are global across the workbook.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
columns | array | Per-column settings, element i for column i; it may be shorter than the table and {} changes nothing. An omitted key keeps the setting and null clears it. On update the headerRow and totalsRow toggles… |
headerRow | boolean | Whether the first range row is the table header; defaults true on create. |
index | integer | Global table index for update/remove. |
name | string | Native table name for create; on update, renames the table and the formulas that reference it. |
range | string | A1 table range, for example Data!A1:C20. |
ref | string | Alias for range, useful for update. |
sheet | Fallback sheet for an unqualified range; a qualified range supplies its own sheet. | |
showColumnStripes | boolean | Band columns. |
showFirstColumn | boolean | Emphasize the first column. |
showLastColumn | boolean | Emphasize the last column. |
showRowStripes | boolean | Band rows; a styled table starts with this on. |
style | string | null | Excel TableStyle name; null clears it on update. |
styleName | string | null | Alias for style. |
totalsRow | boolean | Whether the table has a totals row; defaults false on create. |
formulon_shape_operation Shape operation
List, insert, update, or remove drawing shapes, text boxes and connectors (lines, arrows). Insert places a one-cell shape at anchor with width and height, or a two-cell shape spanning anchor to `to`. An update changes only what it states, keeps the anchor kind, and moves or resizes the shape when a placement field is given. Shapes have no stacking-order control; pictures and charts are handled by formulon_image_operation.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
anchor | string | Top-left cell on the selected sheet, for example B2; required for insert. |
fill | string | Opaque #RRGGBB colour, or none. |
geometry | string | DrawingML preset geometry, for example rect, roundRect, ellipse, rightArrow, line or straightConnector1; defaults to rect. A line or connector geometry holds no text. |
height | object | Height of a one-cell shape. |
hidden | boolean | |
line | string | Outline colour as opaque #RRGGBB, or none. |
lineWidth | object | Outline width. |
name | string | |
objectId | integer | Shape id from list; required for update and remove. |
offsetX | object | Offset from the anchor cell's left edge. |
offsetY | object | Offset from the anchor cell's top edge. |
rotation | number | Clockwise rotation in degrees. |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
text | string | Shape text; newlines separate paragraphs. |
textBox | boolean | Mark the shape as a text box. |
to | string | Bottom-right cell of a two-cell shape; the box stretches with rows/columns. |
width | object | Width of a one-cell shape. |
formulon_sparkline_operation Sparkline operation
List, add, update, or remove sparkline groups: in-cell line, column or win/loss charts. A group shares its type, colours and axes across its sparklines; each sparkline plots one data range into one location cell. An update changes only the stated settings, and `sparklines` replaces the group's sparklines. Group indexes shift when one is removed.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
colors | object | |
dateAxis | string | null | Date range that spaces the points by date; null removes it. |
displayHidden | boolean | Plot data in hidden rows and columns. |
displayXAxis | boolean | Draw the horizontal axis. |
emptyCells | string | How empty cells plot: a gap, zero, or a line spanning them. |
first | boolean | Mark the first point. |
high | boolean | Mark the highest point. |
index | integer | Group index from list; required for update and remove. |
last | boolean | Mark the last point. |
lineWeight | number | Line width in points. |
low | boolean | Mark the lowest point. |
markers | boolean | Mark every point of a line sparkline. |
maxAxis | individual scales each sparkline alone, group shares one scale, a number fixes it. | |
minAxis | individual scales each sparkline alone, group shares one scale, a number fixes it. | |
negative | boolean | Mark negative points. |
rightToLeft | boolean | Plot the points from right to left. |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
sparklines | array | Required for add; on update, replaces the group's sparklines. |
type | string | Defaults to line on add. |
formulon_data_table_operation What-If data table operation
Get, add, or remove a What-If data table ({=TABLE(row_input,col_input)}), or recompute every data table. The formula sits in the row above the result range (column input) or the column left of it (row input), with substitution values along the other edge; a two-variable table has the formula at the top-left corner outside the range. Result cells refuse writes until the table is removed. Add recalculates so the results are readable at once.
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
sessionId * | string | |
cell | string | Any result cell of the table; required for get and remove. |
colInput | string | Input cell that receives the values in the column left of the range. |
range | string | Result range on the selected sheet, for example C3:E8; required for add. |
rowInput | string | Input cell that receives the values in the row above the range. |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. |
formulon_create_pivot Create PivotTable
Create a native Excel PivotTable from a worksheet range. The first source row is a unique, non-empty text header row and at least one data row is required; source cells are capped at 10,000 and are read in one operation after recalculation. Every source header must be assigned exactly once to rows, columns, pages, or a distinct value field (a value field may have multiple aggregations); unknown, unused, or cross-axis fields are rejected before mutation. Values may use sum, count, average, max, min, product, countNumbers, stddev, stddevp, var, or varp. target is an A1 anchor and may include a s…
| Parameter | Type | Description |
|---|---|---|
name * | string | Native PivotTable name. |
sessionId * | string | |
sourceRange * | string | Qualified or unqualified source A1 range, including its header row. |
target * | string | Pivot top-left A1 anchor; may be qualified with a target sheet. |
values * | array | At least one value field; repeated entries for one source field are allowed. |
columns | array | Source headers placed on the column axis. |
grandTotals | object | Whether row and column grand-total bands are enabled. |
layout | string | |
pages | array | Source headers placed on the filter/page axis. |
rows | array | Source headers placed on the row axis. |
sourceLimit | integer | |
sourceSheet | Fallback source sheet for an unqualified sourceRange; defaults to the first sheet. | |
targetSheet | Fallback target sheet when target is unqualified; defaults to the source sheet. |
formulon_preview_range Preview workbook range
Render a bounded workbook range as PNG for visual inspection. The response contains the PNG image first and compact geometry, formatting, pagination, and warning metadata second. Omit range to use a single print area or the used cells plus merges.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
outputPath | string | Optional .png or .svg artifact path. |
range | string | Explicit A1 range, such as Sheet1!A1:D20. |
recalc | boolean | Recalculate before rendering; marks the session dirty. |
scale | number | |
sheet | Zero-based sheet index or name; defaults to the first sheet. | |
showGridLines | boolean | |
showPageBreaks | boolean |
formulon_apply_layout Apply a layout batch
Apply column widths, row heights, merges, styles, and print settings in one ordered batch. The complete operation list is validated before any workbook mutation; a failed preflight leaves the session unchanged. Column sizes default to Excel character units, row sizes to points, and px/mm convert through 96-DPI display geometry. The batch caps at 200 operations, 255 stored width characters, 409 points per row, 10,000 expanded row writes, and 100,000 styled cells.
formulon_audit_formulas Audit repeated formula patterns
Scan a workbook range for repeated formula patterns and report constants, blanks, outliers, and formula errors for review. The default range is the complete stored used rectangle, with no silent prefix truncation. A fully blank row or column is a hard boundary, so include the populated input columns when auditing a table body. The audit never repairs formulas and does not establish formula correctness. Recalculation is opt-in and marks the session dirty before the engine call.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
direction | string | |
maxCells | integer | |
maxFindings | integer | |
minPeers | integer | |
range | string | Optional A1 range; a qualified range chooses its sheet. |
recalc | boolean | |
sheet | Zero-based sheet index or sheet name; defaults to the first sheet. | |
window | integer |