Batch Clear Values by Data Filter

POST {{baseUrl}}/v4/spreadsheets/:spreadsheetId/values:batchClearByDataFilter

Clears one or more ranges of values from a spreadsheet. 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.

Request Params

KeyDatatypeRequiredDescription
access_tokenstringOAuth access token.
altstringData format for response.
callbackstringJSONP
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAvailable to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
upload_protocolstringUpload protocol for media (e.g. "raw", "multipart").
uploadTypestringLegacy upload protocol for media (e.g. "media", "multipart").
$.xgafvstringV1 error format.

Request Body

{"dataFilters"=>[{"a1Range"=>"commodo ea in ut", "developerMetadataLookup"=>{"locationMatchingStrategy"=>"INTERSECTING_LOCATION", "locationType"=>"SHEET", "metadataId"=>-27000770, "metadataKey"=>"ip", "metadataLocation"=>{"dimensionRange"=>{"dimension"=>"DIMENSION_UNSPECIFIED", "endIndex"=>91540263, "sheetId"=>-64167623, "startIndex"=>63800966}, "locationType"=>"DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED", "sheetId"=>46858270, "spreadsheet"=>false}, "metadataValue"=>"Excepteur", "visibility"=>"DOCUMENT"}, "gridRange"=>{"endColumnIndex"=>6998754, "endRowIndex"=>43176042, "sheetId"=>-9008085, "startColumnIndex"=>-17508638, "startRowIndex"=>21352870}}, {"a1Range"=>"esse eiusmod", "developerMetadataLookup"=>{"locationMatchingStrategy"=>"EXACT_LOCATION", "locationType"=>"SHEET", "metadataId"=>-9620585, "metadataKey"=>"in", "metadataLocation"=>{"dimensionRange"=>{"dimension"=>"COLUMNS", "endIndex"=>-85774445, "sheetId"=>81988143, "startIndex"=>-35232572}, "locationType"=>"SPREADSHEET", "sheetId"=>-39029265, "spreadsheet"=>false}, "metadataValue"=>"voluptate adipisicing amet dolor", "visibility"=>"PROJECT"}, "gridRange"=>{"endColumnIndex"=>-87815739, "endRowIndex"=>-52115573, "sheetId"=>67629865, "startColumnIndex"=>66943098, "startRowIndex"=>74725547}}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"clearedRanges":["cillum","dolor"],"spreadsheetId":"in consequat"}