Stay organized with collections
Save and categorize content based on your preferences.
Returns the spreadsheet at the given ID. The caller must specify the
spreadsheet ID. By default, data within grids is not returned. You can
include grid data in one of 2 ways: * Specify a field mask listing your
desired fields using the fields URL parameter in HTTP * Set the
includeGridData URL parameter to true. If a field mask is set, the
includeGridData parameter is ignored For large spreadsheets, as a best
practice, retrieve only the specific spreadsheet fields that you want.
To retrieve only subsets of spreadsheet data, use the ranges URL
parameter. Ranges are specified using A1
notation.
You can define a single cell (for example, A1) or multiple cells (for
example, A1:D5). You can also get cells from other sheets within the
same spreadsheet (for example, Sheet2!A1:C4) or retrieve multiple
ranges at once (for example, ?ranges=A1:D5&ranges=Sheet2!A1:C4).
Limiting the range returns only the portions of the spreadsheet that
intersect the requested ranges.
Arguments
Parameters
spreadsheetId
string
Required. The spreadsheet to request.
includeGridData
boolean
True if grid data should be returned. This parameter is ignored if a field mask was set in the request.
ranges
string
The ranges to retrieve from the spreadsheet.
Raised exceptions
Exceptions
ConnectionError
In case of a network problem (such as DNS failure or refused connection).
HttpError
If the response status is >= 400 (excluding 429 and 503).
TimeoutError
If a long-running operation takes longer to finish than the specified timeout limit.
TypeError
If an operation or function receives an argument of the wrong type.
ValueError
If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout.
Response
If successful, the response contains an instance of Spreadsheet.
Subworkflow snippet
Some fields might be optional or required.
To identify required fields, refer to the API documentation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Method: googleapis.sheets.v4.spreadsheets.get\n\nReturns the spreadsheet at the given ID. The caller must specify the\nspreadsheet ID. By default, data within grids is not returned. You can\ninclude grid data in one of 2 ways: \\* Specify a field mask listing your\ndesired fields using the `fields` URL parameter in HTTP \\* Set the\nincludeGridData URL parameter to true. If a field mask is set, the\n`includeGridData` parameter is ignored For large spreadsheets, as a best\npractice, retrieve only the specific spreadsheet fields that you want.\nTo retrieve only subsets of spreadsheet data, use the ranges URL\nparameter. Ranges are specified using [A1\nnotation](https://developers.google.com/sheets/api/guides/concepts#cell).\nYou can define a single cell (for example, `A1`) or multiple cells (for\nexample, `A1:D5`). You can also get cells from other sheets within the\nsame spreadsheet (for example, `Sheet2!A1:C4`) or retrieve multiple\nranges at once (for example, `?ranges=A1:D5&ranges=Sheet2!A1:C4`).\nLimiting the range returns only the portions of the spreadsheet that\nintersect the requested ranges.\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`Spreadsheet`](https://cloud.google.com/workflows/docs/reference/googleapis/sheets/v4/Overview#Spreadsheet).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get). \n\n### YAML\n\n```yaml\n- get:\n call: googleapis.sheets.v4.spreadsheets.get\n args:\n spreadsheetId: ...\n includeGridData: ...\n ranges: ...\n result: getResult\n```\n\n### JSON\n\n```json\n[\n {\n \"get\": {\n \"call\": \"googleapis.sheets.v4.spreadsheets.get\",\n \"args\": {\n \"spreadsheetId\": \"...\",\n \"includeGridData\": \"...\",\n \"ranges\": \"...\"\n },\n \"result\": \"getResult\"\n }\n }\n]\n```"]]