Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID.
This method differs from spreadsheets.get in that it allows selecting which subsets of spreadsheet data to return by specifying a dataFilters
parameter. Multiple DataFilters
can be specified. Specifying one or more data filters returns the portions of the spreadsheet that intersect ranges matched by any of the filters.
By default, data within grids is not returned. You can include grid data one of 2 ways:
Specify a field mask listing your desired fields using the
fields
URL parameter in HTTPSet the
includeGridData
parameter to true. If a field mask is set, theincludeGridData
parameter is ignored
For large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want.
HTTP request
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}:getByDataFilter
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
spreadsheetId |
The spreadsheet to request. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"dataFilters": [
{
object ( |
Fields | |
---|---|
dataFilters[] |
The |
includeGridData |
True if grid data should be returned. This parameter is ignored if a field mask was set in the request. |
Response body
If successful, the response body contains an instance of Spreadsheet
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/spreadsheets
For more information, see the Authorization guide.