Skip to content

Instantly share code, notes, and snippets.

View anton-dudarev's full-sized avatar
🎯
Focusing

Anoubis anton-dudarev

🎯
Focusing
View GitHub Profile
@anton-dudarev
anton-dudarev / DatabaseFromSpreadsheet.js
Created January 4, 2019 18:17 — forked from brainysmurf/DatabaseFromSpreadsheet.js
In AppMaker, use this to read in data from a Spreadsheet.
/**
* DataFromSpreadsheet: Read in Spreadsheet info for a Calculated Datasource in AppMaker. Use a spreadsheet to define a datasource.
* Useful for data modeling, simple Apps.
* Does not support paging; sheets with large number of rows will see performance penalties
* @param {object} params
* @param {string} params.spreadsheetId The ID of the source spreadsheet
* @param {string} params.sheetName The name of the source sheet
* @param {string} params.datasource The name of the target datasource
* @param {number} params.numHeaders How many rows are headers (default = 1)
* @param {number} params.headerRow Which row contains the name of the field (default=params.numHeaders-1)