Write cells
write_cellsSet values or formulas in specified Excel cells, overwriting existing content at those addresses.
Instructions
Set values or formulas in cells at given addresses, overwriting what is there.
To add new records below existing data without computing addresses use append_rows; to make room between rows use insert_rows.
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": {
"sheet": "<sheet>",
"cells": "<cells>"
},
"name": "write_cells"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File path or preloaded name (list_configured_files). Omit if only one file is preloaded. | |
| cells | Yes | Cells to set: [{"cell": "A1", "value": 100}, {"cell": "B1", "formula": "=A1*2"}]. Existing content is overwritten. | |
| sheet | Yes | Sheet name (case-sensitive). | |
| backup | No | Save a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true). | |
| reason | No | Why; kept in the change log (XLSX_MCP_CHANGE_LOG=true). | |
| recalculate | No | Recompute formulas with LibreOffice after saving. False: faster, formula results stay empty. | |
| allow_external_formulas | No | Allow WEBSERVICE, HYPERLINK, INDIRECT, RTD, CALL, REGISTER and DDE ('|') in formulas. | |
| create_sheet_if_missing | No | Create the sheet if missing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||