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
Parameter | In | Type | Required | Description |
---|---|---|---|---|
spreadsheetId | path | string | true | The unique identifier of the spreadsheet |
sheetId | path | string | true | The unique identifier of the sheet |
range | path | string | true | The range of values, in A1-style notation |
$maxcellsperpage | query | integer | false | The maximum number of cells to retrieve. The default is 50000. The maximum allowed value is 50000. |
$next | query | string | false | Pagination cursor for next set of results. |
$valuestyle | query | string | false | Whether 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
Parameter | Value |
---|---|
$valuestyle | raw |
$valuestyle | calculated |
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}"
}