API Reference

Retrieve data from a sheet

Description

Retrieve data from a range in a sheet. Includes the value & formatting of cells, visibility of columns and cells, merged ranges, etc.
Limit the results to particular fields by providing a comma-separated list of paths, rooted at the data object.
Example: $fields=cells.calculatedValue,cells.formats.valueFormat

GET /spreadsheets/{spreadsheetId}/sheets/{sheetId}/sheetdata

🚧

Required OAuth Scopes:

file:read

Parameters

ParameterInTypeRequiredDescription
spreadsheetIdpathstringtrueThe unique identifier of the spreadsheet
sheetIdpathstringtrueThe unique identifier of the sheet
$cellrangequerystringfalseThe range to query. If not provided, the entire sheet will be queried.
$maxcellsperpagequeryintegerfalseThe maximum number of cells to retrieve. The default is 50000. The maximum allowed value is 50000.
$nextquerystringfalsePagination cursor for next set of results.
$fieldsquerystringfalseA restricted set of fields for a given resource.

Detailed descriptions

$cellrange: The range to query. If not provided, the entire sheet will be queried.
A1 style representation of a cell or range. A range my be unbounded in any/all directions by leaving off the corresponding column or row.

Code Samples

curl -X GET https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/sheetdata  \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http GET https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/sheetdata  \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=GET "https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/sheetdata" \
 --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}/sheetdata', headers = headers)

print(r.json())

Returns

200 - OK

Returns a JSON object with data and @nextLink properties. data contains a SheetData object, and @nextLink provides the URL to the next set of results. If there are no additional results, @nextLink doesn't appear.

Example Responses


{
  "@nextLink": "string",
  "data": {
    "allOf": [
      {
        "cells": [
          [
            {
              "calculatedValue": "undefined",
              "effectiveFormats": {
                "cellFormat": {
                  "backgroundColor": "#4bdf58",
                  "borders": {
                    "bottom": {
                      "color": "#4bdf58",
                      "style": "string",
                      "weight": "number"
                    },
                    "left": {
                      "color": "#4bdf58",
                      "style": "string",
                      "weight": "number"
                    },
                    "right": {
                      "color": "#4bdf58",
                      "style": "string",
                      "weight": "number"
                    },
                    "top": {
                      "color": "#4bdf58",
                      "style": "string",
                      "weight": "number"
                    }
                  },
                  "horizontalAlign": "string",
                  "indent": {
                    "unit": "string",
                    "value": "number"
                  },
                  "leaderDots": "string",
                  "textRotation": "string",
                  "verticalAlign": "string"
                },
                "textFormat": {
                  "bold": "boolean",
                  "fontColor": "#4bdf58",
                  "fontFamily": "Times New Roman",
                  "fontSize": 12,
                  "italic": "boolean",
                  "strikethrough": "boolean",
                  "underline": "boolean"
                },
                "valueFormat": {
                  "currencySymbol": {
                    "currency": {
                      "code": "string",
                      "display": "string"
                    },
                    "generic": "string"
                  },
                  "dateAbbreviateMonth": "boolean",
                  "dateFormatString": "d/m/yyyy",
                  "dateUppercaseAll": "boolean",
                  "displayZeroAs": "string",
                  "enteredIn": "string",
                  "numbersAsWordsOptions": {
                    "capitalizeFirstWord": "boolean",
                    "displayZeroAs": "string"
                  },
                  "percentSymbol": "string",
                  "periodFormat": {
                    "capitalizeFirstWord": "boolean",
                    "display": "string",
                    "precision": "integer",
                    "separator": "string",
                    "showLabels": "boolean",
                    "showNumbersAsWords": "boolean"
                  },
                  "precision": {
                    "auto": "boolean",
                    "value": "integer"
                  },
                  "prefix": "string",
                  "showCurrencySymbol": "boolean",
                  "showLeadingZero": "boolean",
                  "showNumbersAsWords": "boolean",
                  "showPositiveSign": "boolean",
                  "showSignRoundedZero": "boolean",
                  "showThousandsSeparator": "boolean",
                  "shownIn": "string",
                  "suffix": "string",
                  "symbolAlign": "string",
                  "useParensForNegatives": "boolean",
                  "valueFormatType": "string"
                }
              },
              "formats": {
                "cellFormat": {
                  "backgroundColor": "#4bdf58",
                  "borders": {
                    "bottom": {
                      "color": "#4bdf58",
                      "style": "string",
                      "weight": "number"
                    },
                    "left": {
                      "color": "#4bdf58",
                      "style": "string",
                      "weight": "number"
                    },
                    "right": {
                      "color": "#4bdf58",
                      "style": "string",
                      "weight": "number"
                    },
                    "top": {
                      "color": "#4bdf58",
                      "style": "string",
                      "weight": "number"
                    }
                  },
                  "horizontalAlign": "string",
                  "indent": {
                    "unit": "string",
                    "value": "number"
                  },
                  "leaderDots": "string",
                  "textRotation": "string",
                  "verticalAlign": "string"
                },
                "textFormat": {
                  "bold": "boolean",
                  "fontColor": "#4bdf58",
                  "fontFamily": "Times New Roman",
                  "fontSize": 12,
                  "italic": "boolean",
                  "strikethrough": "boolean",
                  "underline": "boolean"
                },
                "valueFormat": {
                  "currencySymbol": {
                    "currency": {
                      "code": "string",
                      "display": "string"
                    },
                    "generic": "string"
                  },
                  "dateAbbreviateMonth": "boolean",
                  "dateFormatString": "d/m/yyyy",
                  "dateUppercaseAll": "boolean",
                  "displayZeroAs": "string",
                  "enteredIn": "string",
                  "numbersAsWordsOptions": {
                    "capitalizeFirstWord": "boolean",
                    "displayZeroAs": "string"
                  },
                  "percentSymbol": "string",
                  "periodFormat": {
                    "capitalizeFirstWord": "boolean",
                    "display": "string",
                    "precision": "integer",
                    "separator": "string",
                    "showLabels": "boolean",
                    "showNumbersAsWords": "boolean"
                  },
                  "precision": {
                    "auto": "boolean",
                    "value": "integer"
                  },
                  "prefix": "string",
                  "showCurrencySymbol": "boolean",
                  "showLeadingZero": "boolean",
                  "showNumbersAsWords": "boolean",
                  "showPositiveSign": "boolean",
                  "showSignRoundedZero": "boolean",
                  "showThousandsSeparator": "boolean",
                  "shownIn": "string",
                  "suffix": "string",
                  "symbolAlign": "string",
                  "useParensForNegatives": "boolean",
                  "valueFormatType": "string"
                }
              },
              "value": "undefined"
            }
          ]
        ],
        "columnMetadata": [
          {
            "hidden": "boolean",
            "size": "integer"
          }
        ],
        "merges": [
          {
            "startColumn": "integer",
            "startRow": "integer",
            "stopColumn": "integer",
            "stopRow": "integer"
          }
        ],
        "range": {
          "startColumn": "integer",
          "startRow": "integer",
          "stopColumn": "integer",
          "stopRow": "integer"
        },
        "rowMetadata": [
          {
            "filtered": "boolean",
            "hidden": "boolean",
            "size": "integer"
          }
        ]
      }
    ]
  }
}