write_cells
Write values or formulas into specific cells in an .xlsx file and recalculate the workbook to update results. Optionally create missing sheets and skip recalculation if needed.
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 | ||
| backup | No | ||
| recalculate | No | ||
| allow_external_formulas | No | ||
| create_sheet_if_missing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||