google-drive-spreadsheet
A library to access Google Drive Spreadsheet API from Node.js https://github.com/bgdavidx/google-drive-spreadsheet
npm install --save google-drive-spreadsheet
API
Promise version (via Bluebird):
var Spreadsheet = SPREADSHEET_ID
Async-Await version (via babel-runtime):
const fn = async { const ss = SPREADSHEET_ID try const rows = await ss console catch err console }
Callback version:
var Spreadsheet = SPREADSHEET_ID
API
Note: Promisified versions also available, omit callback and add async, for example getRows(worksheetId, options, callback)
-> getRowsAsync(worksheetId, options)
Spreadsheet.prototype.getRows(worksheetId, options, callback) =>
returns an array of SpreadsheetRow from the given worksheetId.
example return:
Spreadsheet.prototype.getInfo(callback) =>
returns info for each worksheet in the spreadsheet.
Spreadsheet.prototype.addRow(worksheetId, data, callback) =>
adds a row to the worksheet with the given worksheetId.
Spreadsheet.prototype.getCells(worksheetId, options, callback) =>
returns cells from the spreadsheet.
SpreadsheetWorksheet.prototype.getRows(options, callback) =>
returns rows from the spreadsheet
SpreadsheetWorksheet.prototype.getCells(options, callback) =>
returns rows from the worksheet.
SpreadsheetWorksheet.prototype.addRow(data, callback) =>
adds a row to the worksheet.
SpreadsheetRow.save(callback) =>
saves the modified spreadsheet row to the cloud.
SpreadsheetRow.del(callback) =>
deletes the row from the cloud.
SpreadsheetCell.setValue(newValue, callback) =>
updates the value of the cell in the cloud.
SpreadsheetCell.save(callback) =>
saves the cell to the cloud.
SpreadsheetCell.del(callback) =>
deletes the cell from the cloud.