Data Access

Generated reference for the iPrintessApi methods tagged #ai-api:data-access in printess-editor.d.ts. Custom types referenced below (parameter and return shapes) are documented on the Types reference.

createGoogleSheet

createGoogleSheet(apiKey: string, sheetId: string): iExternalGoogleSheet

Creates a reader for a Google Spreadsheet. Nothing is loaded yet - call loadData() on the returned object first, then read the rows with getData().

The spreadsheet must be shared so that anyone with the link can view it, and apiKey must be a Google Cloud API key which has the Google Sheets API enabled. The key is sent to Google from the browser, so only use a key which is restricted to reading sheets.

Parameter Type Description
apiKey string Google Cloud API key with access to the Google Sheets API.
sheetId string Id of the spreadsheet: the long id part of its url

Returns: iExternalGoogleSheet