batch_update
Execute multiple Google Sheets modifications in a single API call, including adding sheets, updating properties, and inserting or deleting rows and columns.
Instructions
Execute a batch update on a Google Spreadsheet using the full batchUpdate endpoint. This provides access to all batchUpdate operations including adding sheets, updating properties, inserting/deleting dimensions, formatting, and more.
Args: spreadsheet_id: The ID of the spreadsheet (found in the URL) requests: A list of request objects. Each request object can contain any valid batchUpdate operation. Common operations include: - addSheet: Add a new sheet - updateSheetProperties: Update sheet properties (title, grid properties, etc.) - insertDimension: Insert rows or columns - deleteDimension: Delete rows or columns - updateCells: Update cell values and formatting - updateBorders: Update cell borders - addConditionalFormatRule: Add conditional formatting - deleteConditionalFormatRule: Remove conditional formatting - updateDimensionProperties: Update row/column properties - and many more...
Example requests:
[
{
"addSheet": {
"properties": {
"title": "New Sheet"
}
}
},
{
"updateSheetProperties": {
"properties": {
"sheetId": 0,
"title": "Renamed Sheet"
},
"fields": "title"
}
},
{
"insertDimension": {
"range": {
"sheetId": 0,
"dimension": "ROWS",
"startIndex": 1,
"endIndex": 3
}
}
}
]Returns: Result of the batch update operation, including replies for each request
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spreadsheet_id | Yes | ||
| requests | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |