Write to a range
write_rangeOverwrites cells in a specified Google Sheets A1 range with a new value grid, replacing existing data. Use append_rows to add rows or update_row to edit a field.
Instructions
Overwrites the cells of a range with the given values. Warning: existing data in that range is lost. To add rows at the end use append_rows; to change a field in an existing record use update_row.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | Target A1 range, e.g. 'Sheet1!A1'. | |
| values | Yes | Value grid: an array of rows, each row an array of cells. | |
| spreadsheetId | Yes | Spreadsheet ID, or its full URL. The ID is the segment between /d/ and /edit in the URL. | |
| valueInputOption | No | USER_ENTERED parses values as if typed by hand (formulas, dates, numbers). RAW stores them literally as strings. | USER_ENTERED |