edit_excel_workbook
Edit existing Excel workbooks: write cells, set formulas, add charts/tables, apply conditional formatting and data validation, sort, and manage sheets. Overwrite in place or save with backup.
Instructions
Edit an existing .xlsx workbook with typed operations: write_cell, set_formula, freeze_panes, add_chart, conditional_format, data_validation, add_table, sort, add_sheet, set_range_style, and number_format. Rewrites the file — when output_path is omitted the INPUT FILE IS OVERWRITTEN IN PLACE, so pass output_path or options {"backup": true} to keep a .bak copy. To build a new workbook use create_excel_workbook; to inspect one first use analyze_excel_data.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>",
"operations": "<operations>"
},
"name": "edit_excel_workbook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | Tool options (dry_run, backup). | |
| input_path | Yes | Path to the existing .xlsx workbook. | |
| operations | Yes | Typed Excel edit operations applied in order. | |
| output_path | No | Output path (defaults to the input file). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||