Update Spreadsheet
update_spreadsheetWrite data to a range in an existing Google Sheet. The range must reference a tab that already exists (e.g. 'Overview!A1' requires an 'Overview' tab). Errors with 'Unable to parse range' if the tab name is unknown — call add_sheet_tab first to create new tabs. Values are stored EXACTLY AS GIVEN by default, so '=B1+B2' is saved as text and does not calculate; pass value_input_option='USER_ENTERED' to write real formulas. The result carries formula_notice when cells starting with '=' were stored as text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | A1 notation range e.g. 'Sheet1!A1:C10' | |
| data_json | Yes | JSON-encoded 2D array of cell values | |
| clear_first | No | If true clear the range before writing. Defaults to false. | |
| spreadsheet_id | Yes | The spreadsheet ID | |
| value_input_option | No | How to interpret the values. 'RAW' (default) stores every value exactly as given, so '=B1+B2' is stored as the literal text and does NOT compute. 'USER_ENTERED' parses values the way typing them would, so formulas evaluate and dates are recognised. Use USER_ENTERED when the sheet is meant to calculate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Always 'ok' — a failure arrives as an error | |
| updated_rows | Yes | Rows changed | |
| updated_cells | Yes | Cells changed | |
| updated_range | Yes | The fully-qualified range Google wrote, including the tab name. Compare this against the tab you intended — a range with no tab prefix goes to the FIRST sheet. | |
| formula_notice | No | Present only when cells beginning with '=' were written as literal text because value_input_option was RAW. Those cells will NOT compute. Rewrite the range with value_input_option='USER_ENTERED' if formulas were intended. | |
| spreadsheet_id | Yes | The spreadsheet that was written | |
| updated_columns | Yes | Columns changed |