write_cells
Write values and formulas into specific cells of Excel workbooks, with options to create missing sheets and recalculate to check for errors.
Instructions
Write values and/or formulas into specific cells, then recalculate the workbook.
Set recalculate=False to skip the LibreOffice recompute (e.g. for structurally
complex workbooks you don't want round-tripped).
Args: path: Path to the .xlsx file, or the name of a preloaded file. Omit if only one file is configured. sheet: Sheet name. cells: List of {"cell": "A1", "value": ...} or {"cell": "B1", "formula": "=A1*2"}. create_sheet_if_missing: Create the sheet first if it doesn't exist yet. recalculate: Run the LibreOffice recompute pass after saving.
Returns:
Write result including errors_found — any Excel error values produced by recalculation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| cells | Yes | ||
| sheet | Yes | ||
| recalculate | No | ||
| create_sheet_if_missing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||