spreadsheets

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.

get/v4/spreadsheets/{spreadsheetId}

Request

  • Base URL: https://sheets.googleapis.com
  • URL: https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}
  • Auth: one of:
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/drive) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/drive)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/drive.file) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/drive.file)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/drive.readonly) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/drive.readonly)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/spreadsheets) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/spreadsheets)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/spreadsheets.readonly) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/spreadsheets.readonly)

Path parameters

spreadsheetIdstring required

The spreadsheet to request.

Query parameters

commentsViewMode'COMMENTS_VIEW_MODE_UNSPECIFIED' | 'COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS' | 'COMMENTS_VIEW_MODE_OMITTED' | 'COMMENTS_VIEW_MODE_INCLUDED'

The comments view mode to apply to the spreadsheet. This allows viewing the spreadsheet with comments omitted or included. If one is not specified, COMMENTS_VIEW_MODE_OMITTED is used.

excludeTablesInBandedRangesboolean

True if tables should be excluded in the banded ranges. False if not set.

includeGridDataboolean

True if grid data should be returned. This parameter is ignored if a field mask was set in the request.

rangesstring[]

The ranges to retrieve from the spreadsheet.

Response

Successful response

Changes

    • breaking

      removed the media type */* for the response with the status

    • info

      the security scope https://www.googleapis.com/auth/drive was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/drive was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/spreadsheets.readonly was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/spreadsheets.readonly was removed from the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/drive was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/drive was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/spreadsheets.readonly was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/spreadsheets.readonly was removed from the endpoint's security scheme Oauth2c

    • info

      added the new optional query request parameter commentsViewMode

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property // to the response with the status