Codumentor logo Codumentor

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 File Links 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 File Links 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".

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_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.

To list saved workbooks under This conversation in the Files browser, add xlsx_save to File Links' tracked_tools. The editor's own download card does not depend on that.

See also