sheets.spreadsheets.values.batchClear
Clears values from one or more spreadsheet ranges while preserving cell formatting and data validation. Specify the spreadsheet ID and ranges to remove data without deleting other cell properties.
Instructions
Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. Only values are cleared -- all other properties of the cell (such as formatting and data validation) are kept [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON BatchClearValuesRequest object accepting ranges; pass it via params or whole via body_file Siblings over the same resource: append, batchClearByDataFilter, batchGet, batchGetByDataFilter, batchUpdate, batchUpdateByDataFilter, clear, get, update.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON BatchClearValuesRequest object. | |
| request_body | No | Request body of type BatchClearValuesRequest: pass it via `params` (merged into the built body) or whole via `body_file`. | |
| spreadsheetId | Yes | [URL path segment] The ID of the spreadsheet to update. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clearedRanges | No | ||
| spreadsheetId | No |