gspread-async
This module provides a wrapper for the google-spreadsheet module, exposing a subset of the most common used functionalities, using a modern async interface.
Note: The module relies on the service account authentication method described in the google-spreadsheet module.
Install
You can install with [npm]:
$ npm install --save gspread-async
Usage
You need to define an object with 3 parameters in order to get or write data to an spreadsheet:
- The gooogle spreadsheet id.
- The name of sheet you want to use.
- The path of the JSON file containing the authentication credentials.
const parameters = docid: '<your spreadsheetid>' credspath: '<your path with the google credentials file>' sheetid: '<your sheetid>'
Once you have this object you can use it to either getRows
, getCells
or addRow
to a particular sheet:
const gspreadasync = const parameters = docid: '<your spreadsheetid>' credspath: '<your path with the google credentials file>' sheetid: '<your sheetid>' { // Get Rows const rows = await gspreadasync // Get Cells const cells = await gspreadasync // Add Row. The column names have to match the ones in the spreadsheet const cells = await gspreadasync}
License
Copyright © 2019, Juan Convers. Released under the MIT License.