Update Spreadsheet Values
sheets_update_valuesUpdate a Google Spreadsheet range with a 2D array of values. Supports raw data or user-entered input for formulas, dates, and numbers.
Instructions
Write cell values to a specific range in a Google Spreadsheet.
Args:
spreadsheet_id (string): The ID of the Google Spreadsheet
range (string): The A1 notation range to update (e.g., 'Sheet1!A1:D10')
values (array): 2D array of values to write (rows of cells)
value_input_option ('RAW' | 'USER_ENTERED'): How to interpret input (default: 'USER_ENTERED')
'RAW': Values are stored as-is
'USER_ENTERED': Values are parsed as if typed by user (formulas, dates work)
Returns: { "spreadsheetId": string, "updatedRange": string, "updatedRows": number, "updatedColumns": number, "updatedCells": number }
Examples:
Write data: range="Sheet1!A1", values=[["Name", "Age"], ["Alice", 30]]
Write formula: range="Sheet1!C1", values=[["=SUM(A1:B1)"]]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spreadsheet_id | Yes | The ID of the Google Spreadsheet | |
| range | Yes | The A1 notation range to update (e.g., 'Sheet1!A1:D10') | |
| values | Yes | 2D array of values to write (rows of cells) | |
| value_input_option | No | How to interpret input: 'RAW' for literal values, 'USER_ENTERED' to parse formulas | USER_ENTERED |