Working with Spreadsheets
The assistant can open, read, and edit Excel workbooks (.xlsx and .xlsm) as part of a conversation. Ask it to work on a spreadsheet in your repository and it can inspect the data, change values and formulas, restructure sheets, and save the result for you to download.
Asking the assistant to edit a spreadsheet
There's no separate spreadsheet editor panel — you ask for changes in plain language, the same way you'd ask for a code change, and the assistant opens the workbook and works on it as part of the conversation.
"Open budget.xlsx and update the Q3 totals in column D."
"In schedule.xlsx, add a new sheet called Summary that totals each region's numbers."
"Find every cell in inventory.xlsx that still says 'TBD' and replace it with 'Pending'."
You don't need to know any tool names or Excel internals — describe the outcome you want and the assistant figures out which cells, sheets, or formulas to touch.
What it can do
| Capability | What it does |
|---|---|
| Read structure | List sheets, dimensions, named ranges, and defined tables |
| Read and search | Read a range of cells, or search across one sheet or the whole workbook |
| Write cells and ranges | Update a single cell or write a block of values in one step; a value starting with = is treated as a formula |
| Restructure sheets | Add, delete, or rename worksheets; insert or delete rows and columns |
| Find and replace | Replace text across the workbook, one sheet, or a specific range |
| Formatting | Set number formats (currency, percentages, dates) and cell styles (font, fill, border, alignment) |
| Workbook properties | Set metadata such as title, author, and description |
| Print settings | Read page setup, margins, and headers/footers |
| Advanced edits | For things the other capabilities don't cover — merging cells, charts, conditional formatting, data validation — the assistant can fall back to a small script run directly against the workbook |
Multiple sheets, named ranges, and tables are all read and preserved. Macros in .xlsm files are kept when the file is saved, but the assistant does not run or edit them.
Formulas
Formulas are recognized by a leading = and can be written, read, and searched like any other cell value.
The default range read returns formula text (such as =SUM(A1:A5)), not a computed result. With use_cached=true, the assistant reads the data_only snapshot taken when the workbook was opened, falling back to formula text if a formula has no cached result. The scripting name wb_cached exposes that same original-open snapshot directly; unlike the range reader, its missing cached results are None.
The assistant does not calculate formulas, even on save. The original-open snapshot is not refreshed on save. Cached results may be absent or stale — even an unchanged formula can be stale after its input cells change. New or modified formulas may appear blank in viewers that do not recalculate. Volatile formulas such as
NOW()and dynamic-array formulas such asUNIQUE()also require recalculation in a compatible application. Open the saved file in a compatible Excel or LibreOffice version and recalculate before relying on computed values; reopening it in Codumentor alone does not calculate anything.
Advanced scripting
Conditional formatting and data validation use the xlsx_python escape hatch rather than dedicated tools. Use the preloaded constructors, including FormulaRule, CellIsRule, and DataValidation, or import from the allowlisted openpyxl authoring modules (from openpyxl.formatting.rule import IconSet). See the spreadsheet scripting reference for the exact available globals, cache lifecycle, and examples.
Saving and downloading
Nothing is written back to disk until the assistant saves. When it does, a Spreadsheet saved card appears in the conversation with the file name, size, and a download link.
You can ask the assistant to edit the file in place, or to save the result to a new path and leave the original untouched. If you end the editing session with unsaved changes, the assistant either saves first or has to be explicitly told to discard them — it won't drop your edits silently.
Limits you should know about
- Workbooks up to 50 MB can be opened; larger files are refused.
- A search returns at most 50 matches per request.
- Only one workbook can be open for editing at a time in a conversation — ask the assistant to close the current one before starting another.
- Editing currently works on spreadsheets that live in your repositories.
This feature may not be available in all setups. If the assistant can't open or edit a spreadsheet for you, it may not be enabled by the administrator.
Like other actions the assistant takes, spreadsheet edits show up as transparent tool calls in the transcript — see What the Assistant Can Do. Editing a file inside your working directory, spreadsheets included, does not require a separate approval step; see Permissions for details.