API Reference

Spreadsheets

Spreadsheets enable you to work with large, complex data in a familiar, collaborative, and controlled environment. Use these endpoints to manage spreadsheets and their sheets in the Workiva platform.

Spreadsheet

Properties

NameTypeDescriptionRestrictions
createdActionWhen the action was performed, and details about the user who did itread-only
idstringThe unique identifier of the spreadsheetread-only
modifiedActionWhen the action was performed, and details about the user who did itread-only
namestringThe name of the spreadsheetread-only
sheets[Sheet]An array of partial information about the sheets in this spreadsheet. Optionally included in the response when the $expand query parameter is provided.read-only
templatebooleanWhether the spreadsheet is a templateread-only

Example

{
  "created": {
    "dateTime": "2019-10-30T15:03:27Z",
    "user": {
      "displayName": "string",
      "email": "string",
      "id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD"
    }
  },
  "id": "124efa2a142f472ba1ceab34ed18915f",
  "modified": {
    "dateTime": "2019-10-30T15:03:27Z",
    "user": {
      "displayName": "string",
      "email": "string",
      "id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD"
    }
  },
  "name": "Year-end review",
  "sheets": [
    {
      "id": "27f1b61c04ae4b0991bc73c631914e1d",
      "name": "Q1"
    }
  ],
  "template": false
}

SpreadsheetExport

Properties

NameTypeDescriptionRestrictions
csvOptionsSpreadsheetToCsvOptions¦nullOptional options to export the spreadsheet as a comma-separated values (.CSV) file. If no options are provided, exportAsFormulas defaults to False.
formatstringThe file format to export the spreadsheet as.
pdfOptionsSpreadsheetToPdfOptions¦nullOptional options to export the spreadsheet as a portable document file (.PDF). If no options are provided, all options default to False except:
- pageHeight, which defaults to 11
- pageWidth, which defaults to 8.5
- pageOrientation, which defaults to "portrait"
- pageScale, which defaults to "actualSize"
sheets[string]The IDs of the sheets within the spreadsheet to export. Omit to export the entire spreadsheet.

Note: When exporting to .CSV, you can export only the entire spreadsheet or a single sheet. When exporting the entire spreadsheet, the resulting file is a .ZIP of .CSV files, with one .CSV file per sheet.
xlsxOptionsSpreadsheetToXlsxOptions¦nullOptional options to export the spreadsheet as a Microsoft Excel (.XLSX) file. If no options are provided, exportAsFormulas defaults to False, and exportPrecision defaults to fullPrecision.

Enumerated Values

PropertyValue
formatpdf
formatxlsx
formatcsv

Example

{
  "format": "xlsx",
  "sheets": [
    "7c8d8c4a46784455bg68t36f9d8232d8",
    "54bgd83b471e5902f1a8e8c9a299c9fb"
  ],
  "xlsxOptions": {
    "exportAsFormulas": true,
    "exportPrecision": "displayed"
  }
}

SpreadsheetToPdfOptions

Properties

NameTypeDescriptionRestrictions
includeCommentsbooleanWhether to include comments when exporting to .PDF False by default.
includeDraftWatermarkbooleanWhether to include draft watermark when exporting to .PDF. False by default.
includeHyperlinksbooleanWhether to include hyperlinks when exporting to .PDF. False by default.
includeLeaderDotsbooleanWhether to include leader dots when exporting to .PDF. False by default.
includeTrackChangesbooleanWhether to include track changes when exporting to .PDF. False by default.
onlyExportPrintAreasbooleanWhether to only export print areas when exporting to .PDF. False by default.
pageHeightnumber(double)The height of the exported .PDF, in inches. 11 by default.
pageOrientationstringThe orientation of the exported .PDF, such as "portrait" or "landscape". "portrait" by default.
pageScalestringThe scale of the exported .PDF. "actualSize" by default.
pageWidthnumber(double)The width of the exported .PDF, in inches. 8.5 by default.
showCellFillsbooleanWhether to show cell fills when exporting to .PDF. False by default.
showGridlinesbooleanWhether to show gridlines when exporting to .PDF. False by default.
useCmykColorspacebooleanWhether to use CMYK colorspace when exporting to .PDF. False by default.

Enumerated Values

PropertyValue
pageOrientationportrait
pageOrientationlandscape
pageScaleactualSize
pageScalefitToWidth

Example

{
  "includeComments": true,
  "includeDraftWatermark": true,
  "includeHyperlinks": true,
  "includeLeaderDots": true,
  "includeTrackChanges": true,
  "onlyExportPrintAreas": true,
  "pageHeight": 14,
  "pageOrientation": "landscape",
  "pageScale": "fitToWidth",
  "pageWidth": 11,
  "showCellFills": true,
  "showGridlines": true,
  "useCmykColorspace": true
}

SpreadsheetToXlsxOptions

Properties

NameTypeDescriptionRestrictions
exportAsFormulasbooleanWhether to export cells that contain formulas as the formula or its result when exporting to .XLSX. False by default.
exportPrecisionstringHow to export values in the sheet when exporting to .XLSX "fullPrecision" by default.

Enumerated Values

PropertyValue
exportPrecisionfullPrecision
exportPrecisionrounded
exportPrecisiondisplayed

Example

{
  "exportAsFormulas": true,
  "exportPrecision": "displayed"
}

SpreadsheetToCsvOptions

Properties

NameTypeDescriptionRestrictions
exportAsFormulasbooleanWhether to export cells containing formulas as the formula or the formula result. False by default.

Example

{
  "exportAsFormulas": true
}

Sheet

Properties

NameTypeDescriptionRestrictions
children[Sheet]An array of partial information about any child sheetsread-only
datasetDataset¦nullThe range of the dataset on this sheet, if one exists.
* To modify a dataset, either update or delete it.
read-only
idstringThe unique identifier of the sheetread-only
indexintegerThe integer index of the sheet relative to its parent sheet or to the spreadsheet, if no parent sheet. To position a sheet at the end of its siblings, use the special value -1.
namestringThe name of the sheet
parentSheet¦nullThe sheet's ID and name

Example

{
  "children": [
    {
      "id": "27f1b61c04ae4b0991bc73c631914e1d",
      "name": "Q1"
    }
  ],
  "dataset": {
    "range": "A1:B2"
  },
  "id": "27f1b61c04ae4b0991bc73c631914e1d",
  "index": 1,
  "name": "Q1",
  "parent": {
    "id": "27f1b61c04ae4b0991bc73c631914e1d",
    "name": "Q1"
  }
}

Dataset

Properties

NameTypeDescriptionRestrictions
rangestringA1 style notation describing the range. Datasets are always located in the top left-hand corner of the sheet, so there is no need to specify range when creating a dataset.read-only
sheetstringThe unique identifier of the sheet to which this dataset belongs.
values[array]A row-major ordered multidimensional array of cell values.

Example

{
  "range": "A1:B2",
  "sheet": "27f1b61c04ae4b0991bc73c631914e1d",
  "values": [
    [
      1,
      4
    ],
    [
      2,
      ""
    ]
  ]
}

Datasets

Properties

NameTypeDescriptionRestrictions
[Dataset]An array of Datasets to submit at once

Example

[
  {
    "range": "A1:B2",
    "sheet": "27f1b61c04ae4b0991bc73c631914e1d",
    "values": [
      [
        1,
        4
      ],
      [
        2,
        ""
      ]
    ]
  }
]

RangeValues

Properties

NameTypeDescriptionRestrictions
rangestringThe range of values, in A1-style notation.
values[array]A row-major ordered multidimensional array of cell values.

Example

{
  "range": "A1:B2",
  "values": [
    [
      1,
      4
    ],
    [
      2,
      ""
    ]
  ]
}