Write values to a range
write_valuesOverwrite a Google Sheets range with a 2-D array of values. Choose USER_ENTERED to parse formulas, numbers, and dates, or RAW for literal text; null leaves cells unchanged.
Instructions
Overwrites one A1 range with a 2-D values matrix (rows first) and returns updatedRange/updatedRows/updatedColumns/updatedCells. The matrix is anchored at the range's top-left corner; cells beyond the matrix keep their old content, and a null entry skips (does not clear) that cell — use clear_values to empty cells. value_input_option USER_ENTERED (default) parses input like typing in the UI: "=SUM(A1:A10)" becomes a live formula, "1,234" and "2026-01-15" become number/date per the spreadsheet locale; RAW stores everything as literal values. For several ranges use batch_write_values (one quota unit instead of N).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | A1-notation range, e.g. "Sheet1!A1:C10", "'My sheet'!B2:D" (quote titles with spaces) or a bare sheet title for the whole sheet. | |
| values | Yes | 2-D array of cell values, outer array = rows: [["Name","Score"],["Ada",42]]. null leaves the existing cell untouched. | |
| spreadsheet_id | Yes | The spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output. | |
| value_input_option | No | USER_ENTERED (default) parses formulas/numbers/dates; RAW stores literal strings. | |
| include_values_in_response | No | Return the written cells (as rendered) in the response. |