API Reference

Retrieve a list of range values

Description

Returns the paginated values for a specified range.
When you retrieve values from a range, Ones scale is used regardless of the cell's scale formatting.

GET /spreadsheets/{spreadsheetId}/sheets/{sheetId}/values/{range}

🚧

Required OAuth Scopes:

file:read

Parameters

ParameterInTypeRequiredDescription
spreadsheetIdpathstringtrueThe unique identifier of the spreadsheet
sheetIdpathstringtrueThe unique identifier of the sheet
rangepathstringtrueThe range of values, in A1-style notation
$maxcellsperpagequeryintegerfalseThe maximum number of cells to retrieve
$nextquerystringfalsePagination cursor for next set of results.
$valuestylequerystringfalseWhether to retrieve raw or calculated cell values. For example, if a cell's value is =1+1, raw retrieves the value =1+1, while calculated retrieves 2.

Enumerated Values

ParameterValue
$valuestyleraw
$valuestylecalculated

Code Samples

curl -X GET https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/values/{range}  \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http GET https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/values/{range}  \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=GET "https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/values/{range}" \
 --output-document -  \ 
 --header 'Accept: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/values/{range}', headers = headers)

print(r.json())

Returns

200 - OK

Returns a JSON object with data and @nextLink properties. data contains a single RangeValues object, and @nextLink provides the URL to the next set of results. If there are no additional results, @nextLink doesn't appear. If the request returns no results at all, data contains an empty array.

Example Responses


{
  "data": [
    {
      "range": "A1:C3",
      "values": [
        [
          "First",
          "Second",
          "Third"
        ],
        [
          1,
          2,
          ""
        ],
        [
          3,
          4,
          5
        ]
      ]
    }
  ],
  "@nextLink": "{opaqueUrl}"
}