Codumentor logo Codumentor Enterprise

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

KeyTypeDefaultDescription
enabledbooltrueMaster switch.
target_agentsstring"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.

ToolWhenDescription
xlsx_openalwaysOpen or create an .xlsx/.xlsm workbook
xlsx_read_workbookopenSheets, dimensions, named ranges, tables, active sheet
xlsx_read_rangeopenRead a 2D range (A1 notation), formulas or cached values
xlsx_searchopenRegex search across sheets
xlsx_write_cellopenWrite a cell (a leading = is a formula)
xlsx_write_rangeopenWrite a 2D array of values
xlsx_list_sheetsopenPer-sheet metadata (dimensions, tab colour, visibility)
xlsx_create_sheet / xlsx_delete_sheet / xlsx_rename_sheetopenAdd, remove, or rename worksheets
xlsx_insert_rows / xlsx_delete_rowsopenInsert or delete rows
xlsx_insert_cols / xlsx_delete_colsopenInsert or delete columns
xlsx_replace_textopenFind/replace across the workbook, a sheet, or a range
xlsx_set_cell_formatopenNumber format for a cell or range
xlsx_set_styleopenFont, fill, border, and alignment
xlsx_set_propertyopenWorkbook property (title, author, …)
xlsx_read_print_settingsopenPage setup, margins, headers/footers
xlsx_pythonopenAdvanced edits via openpyxl
xlsx_saveopenSave; transcript shows a download card
xlsx_renderopen, LibreOffice installedShows printed pages of the current state (unsaved edits included) as images, with the count; absent when soffice is not found at startup
xlsx_closeopenClose; 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