insert_delete
Insert or delete rows and columns in Excel workbooks while automatically updating formulas, named ranges, tables, and merged cells across all sheets to prevent broken references.
Instructions
Insert or delete rows/columns. Unlike plain openpyxl, formulas across ALL sheets, named ranges, tables and merged cells are re-pointed (references into deleted cells become #REF! like Excel).
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": {
"path": "<path>",
"action": "<action>",
"index": "<index>"
},
"name": "insert_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path, relative to the root folder (or absolute inside it). | |
| count | No | How many rows/columns. | |
| index | Yes | Row number (1-based) or column letter/number where to insert/delete. | |
| sheet | No | Sheet name (or 0-based index). Default: first sheet. | |
| action | Yes | Operation. | |
| dry_run | No | Preview the change without saving. |