XLSX Editor Plugin
Lets the agent open, edit, and save Excel workbooks (.xlsx / .xlsm) in the conversation. Ask it to work on a spreadsheet; editing tools appear once a workbook is open, and disappear when it is closed. Saved files show a download card in the transcript (served by the Files plugin).
Macros in .xlsm files are preserved. Formula results the agent reads are the cached values from the last save, not a live Excel recalc.
Configuration
plugins:
- module: codumentor.plugins.xlsx_editor
class: XlsxEditorPlugin
args:
enabled: true
target_agents: "main" # "main", "subagent", or "all" (default: "main")
Keep Files enabled so download cards in the transcript resolve. Without it, save cards still render but their links 404.
Parameters
| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Master switch. |
target_agents | string | "main" | Which agents get the tools: "main", "subagent", or "all". Any other value is treated as "all". |
Optional visual rendering
Editing does not require LibreOffice. Visual rendering requires soffice in the
server runtime, discovered when the editor loads; restart the service after
installation. Admin → Server reports cached discovery, not sandbox execution
verification. Standard distro installs work with the default overlay; /opt
installs and user fonts are not automatically exposed. In containers install in
the server image/container, not just its host. pdftoppm is optional.
See office prerequisites
for installation scope, fonts, confinement, and visual-validation limitations.
What the agent can do
xlsx_open is always available. After a workbook is open, the editing tools below appear; xlsx_close removes them.
The agent can open an existing workbook from a repo, copy it to a new path before editing, or create a blank workbook (create_new). Maximum file size is 50 MB. Search returns at most 50 matches.
| Tool | When | Description |
|---|---|---|
xlsx_open | always | Open or create an .xlsx/.xlsm workbook |
xlsx_read_workbook | open | Sheets, dimensions, named ranges, tables, active sheet |
xlsx_read_range | open | Read a 2D range (A1 notation), formulas or cached values |
xlsx_search | open | Regex search across sheets |
xlsx_write_cell | open | Write a cell (a leading = is a formula) |
xlsx_write_range | open | Write a 2D array of values |
xlsx_list_sheets | open | Per-sheet metadata (dimensions, tab colour, visibility) |
xlsx_create_sheet / xlsx_delete_sheet / xlsx_rename_sheet | open | Add, remove, or rename worksheets |
xlsx_insert_rows / xlsx_delete_rows | open | Insert or delete rows |
xlsx_insert_cols / xlsx_delete_cols | open | Insert or delete columns |
xlsx_replace_text | open | Find/replace across the workbook, a sheet, or a range |
xlsx_set_cell_format | open | Number format for a cell or range |
xlsx_set_style | open | Font, fill, border, and alignment |
xlsx_set_property | open | Workbook property (title, author, …) |
xlsx_read_print_settings | open | Page setup, margins, headers/footers |
xlsx_python | open | Advanced edits via openpyxl |
xlsx_save | open | Save; transcript shows a download card |
xlsx_render | open, LibreOffice installed | Shows printed pages of the current state (unsaved edits included) as images, with the count; absent when soffice is not found at startup |
xlsx_close | open | Close; refuses over unsaved changes unless save_first or discard_changes |
Saving
Nothing reaches disk until xlsx_save, and xlsx_close refuses to close over unsaved edits — pass save_first=true to save on the way out, or discard_changes=true to throw them away deliberately. Closing tears down the worker process that holds the only copy of the edits, so a close that quietly dropped them would report success while losing the work.
Saved workbooks appear automatically under Changed here in the Files browser through provider-declared file effects. The editor retains its own download card without a duplicate Files card.
See also
- Document Editor and PPTX Editor
- Files — download cards and the repo browser