sheets.spreadsheets.values.batchClearByDataFilter
Clears values in spreadsheet ranges that match specified data filters while preserving formatting, validation, and other cell properties.
Instructions
Clears one or more ranges of values from a spreadsheet. For more information, see Read, write, and search metadata. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc.) 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 BatchClearValuesByDataFilterRequest object accepting dataFilters; pass it via params or whole via body_file Siblings over the same resource: append, batchClear, 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 BatchClearValuesByDataFilterRequest object. | |
| request_body | No | Request body of type BatchClearValuesByDataFilterRequest: 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 |