Skip to main content

Spreadsheets

The Google Sheets and Excel files the user added in Rollstack, read with the user's own Google or Microsoft account. Rollstack sees only the files added in the app, not the user's whole Drive or OneDrive.

Find a file with searchSpreadsheets, list its sheets with getSpreadsheet, then add a range of a sheet to a report with addReportDatasheets.

Search spreadsheets

GET https://api.rollstack.com/public/v1/spreadsheets

The Google Sheets and Excel files the user added in the app whose name holds any word of query, in any case, most words first, at most 50. Rollstack can't search the user's whole Google Drive or OneDrive: for another file, ask the user to add it in the app. Confirm the file with the user, then list its sheets with getSpreadsheet.

Requires the connections:read scope.

Operation ID: searchSpreadsheets.

Query parameters

  • query (string): Words to search for in names, separated by spaces: a dashboard, table, model or spreadsheet is returned when its name contains any of them, case-insensitively, a table's full name with its database and schema. If omitted, results aren't filtered by name. At most 50 results are returned either way. Example: revenue.

Response 200

Success

application/json: array of object

  • id (string, required): Unique identifier for the spreadsheet in Rollstack, not the file's id in Google Drive, OneDrive or SharePoint. Pass it as id to getSpreadsheet to list its sheets, and as spreadsheetId to addReportDatasheets.
  • name (string, required): The spreadsheet's name, as it was when the file was added to Rollstack: renaming the file afterwards in Google Sheets or Excel doesn't change it here. searchSpreadsheets matches query against it.
  • type (string, required): Which app the spreadsheet belongs to, and so which of your accounts Rollstack reads it with. GoogleSheet is a Google Sheets file, read with your Google account. MicrosoftExcel is an Excel workbook in OneDrive or SharePoint, read with your Microsoft account. Excel files stored in Google Drive aren't available through the API. One of GoogleSheet, MicrosoftExcel.
  • url (string, required): Link that opens the spreadsheet in Google Sheets or in Excel for the web, for example to check it's the right file before you add it to a report.

Get spreadsheet

GET https://api.rollstack.com/public/v1/spreadsheets/{id}

A Google Sheets or Excel file the user added in the app, with its sheets, read with the user's own Google or Microsoft account. Fails with user-missing-oauth when the user hasn't connected that account in the app. Find the file's id with searchSpreadsheets, then add a range of one of its sheets to a report with addReportDatasheets by the sheet's id.

Requires the connections:read scope.

Operation ID: getSpreadsheet.

Path parameters

  • id (string, required): The spreadsheet whose sheets to list, by its id from searchSpreadsheets. This is Rollstack's identifier, not the file's id in Google Drive, OneDrive or SharePoint. It must be one of your own spreadsheets in Rollstack: another member's spreadsheet returns 404, as does an Excel file stored in Google Drive.

Response 200

Success

application/json

  • id (string, required): Unique identifier for the spreadsheet in Rollstack, not the file's id in Google Drive, OneDrive or SharePoint. Pass it as id to getSpreadsheet to list its sheets, and as spreadsheetId to addReportDatasheets.
  • name (string, required): The spreadsheet's name, as it was when the file was added to Rollstack: renaming the file afterwards in Google Sheets or Excel doesn't change it here. searchSpreadsheets matches query against it.
  • type (string, required): Which app the spreadsheet belongs to, and so which of your accounts Rollstack reads it with. GoogleSheet is a Google Sheets file, read with your Google account. MicrosoftExcel is an Excel workbook in OneDrive or SharePoint, read with your Microsoft account. Excel files stored in Google Drive aren't available through the API. One of GoogleSheet, MicrosoftExcel.
  • url (string, required): Link that opens the spreadsheet in Google Sheets or in Excel for the web, for example to check it's the right file before you add it to a report.
  • sheets (array of object, required): The sheets (tabs) in the spreadsheet as they are now in Google Sheets or Excel, hidden ones included. Pass a sheet's id as sheetId to addReportDatasheets to add a range of its cells to a report.
    • id (string, required): Unique identifier for the sheet within the spreadsheet. Pass it as sheetId to addReportDatasheets, with the spreadsheet's id as spreadsheetId and the cells to read as range. In Google Sheets, it is the number after gid= in the sheet's URL.
    • title (string, required): The sheet's name, as shown on its tab in Google Sheets or Excel.