google-spreadsheets-table
v0.0.3
Published
A cached Google Spreadsheets table over [segmentio/google-spreadsheets](/segmentio/google-spreadsheets).
Downloads
7
Readme
google-spreadsheets-table
A cached Google Spreadsheets table over segmentio/google-spreadsheets.
Install
$ npm install segmentio/google-spreadsheets-table
Example
Initialize the Sheet
var Table = require('google-spreadsheets-table');
var table = Table(worksheet)
.headerRow(1)
.idColumn(1)
.flushAt(ms('10s'));
Update a Cell
table.set('hearthrob', { email: '[email protected]'});
table.set('hearthrob' { name: 'Gordon Hearthrob'});
table.set('calvin4', { email: '[email protected]'});
table.set('calvin4' { name: 'Calvin French-Owen'});
Flush Updates
table.flush();
Full Example
var spreadsheets = require('google-spreadsheets');
var Table = require('google-spreadsheets-table');
spreadsheets
.login('username', 'password')
.key('0AvP3ixW_RotVdHdnWDZvUHhnWWhHQy0xZFViN3hUSmc')
.open(function (err, spreadsheet) {
var worksheets = spreadsheet.worksheets;
var worksheet = spreadsheet.select(worksheets[0].id);
var table = Table(worksheet);
});
API
Table(worksheet)
Create a cached Google Spreadsheet around a worksheet.
.set(id, attrs, callback)
Set the attrs
on the spreadsheet row associated with id
.
.flush(callback)
Flushes the update changes to the spreadsheet.
License
WWWWWW||WWWWWW
W W W||W W W
||
( OO )__________
/ | \
/o o| MIT \
\___/||_||__||_|| *
|| || || ||
_||_|| _||_||
(__|__|(__|__|