sheets_update_values
Update specific ranges in Google Sheets with a 2D array of values. Supports fixed or flexible ranges, ensuring accurate data insertion and row count alignment. Ideal for batch updates.
Instructions
Update values in a specified range of a Google Sheets spreadsheet. Examples:
- Fixed range "A1:C3" - must provide exactly 3 rows
- Flexible range "A1" - will expand to fit all provided rows
- To update rows 42-74 (33 rows), use "A42" not "A42:E53" IMPORTANT: Empty rows in your data array still count as rows!
Input Schema
Name | Required | Description | Default |
---|---|---|---|
range | Yes | The A1 notation range to update. Use "Sheet1!A1:B10" for exact range (must match row count exactly) or "Sheet1!A1" for flexible range that auto-expands based on data. TIP: If updating multiple rows with varying content, use flexible range (e.g., "A42" instead of "A42:E53") to avoid row count mismatch errors. | |
spreadsheetId | Yes | The ID of the spreadsheet (found in the URL after /d/) | |
valueInputOption | No | How the input data should be interpreted (default: USER_ENTERED) | |
values | Yes | A 2D array of values to update, where each inner array represents a row |