update_excel_cells
Write values to individual cells in an Excel file by coordinate. Accepts strings, formulas (starting with =), numbers, booleans, and null. Save is atomic to prevent corruption.
Instructions
Set individual cells by coordinate, e.g. {"A1": "Title", "B2": 42}.
String values starting with "=" are written as formulas (e.g. "=SUM(A1:A5)"). Note: newly written formulas have no calculated value until the file is opened in Excel. For cells inside a merged range, write to the range's top-left anchor cell.
The save is atomic — a failed write never corrupts the original file.
@param file_path: Absolute path to the .xlsx/.xlsm file. @param updates: Mapping of cell coordinate to value. @param sheet_name: Target sheet. None = first sheet. @return: Confirmation with the number of cells written.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updates | Yes | ||
| file_path | Yes | ||
| sheet_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |