googlesheets@3.0.5
- appendValues(params, callback)
- batchUpdateValues(params, callback)
- getValues(spreadsheetId, range, callback)
This adaptor exports the following from common:
- alterState()
- combine()
- cursor()
- dataPath()
- dataValue()
- each()
- field()
- fields()
- fn()
- fnIf()
- http
- lastReferenceValue()
- merge()
- sourceValue()
Functions
appendValues
appendValues(params, callback) ⇒ Operation
Add an array of rows to the spreadsheet. https://developers.google.com/sheets/api/samples/writing#append_values
Param | Type | Description |
---|---|---|
params | Object | Data object to add to the spreadsheet. |
[params.spreadsheetId] | string | The spreadsheet ID. |
[params.range] | string | The range of values to update. |
[params.values] | array | A 2d array of values to update. |
callback | function | (Optional) Callback function |
Example
appendValues({
spreadsheetId: '1O-a4_RgPF_p8W3I6b5M9wobA3-CBW8hLClZfUik5sos',
range: 'Sheet1!A1:E1',
values: [
['From expression', '$15', '2', '3/15/2016'],
['Really now!', '$100', '1', '3/20/2016'],
],
})
batchUpdateValues
batchUpdateValues(params, callback) ⇒ Operation
Batch update values in a Spreadsheet.
Returns: Operation
- spreadsheet information
Param | Type | Description |
---|---|---|
params | Object | Data object to add to the spreadsheet. |
[params.spreadsheetId] | string | The spreadsheet ID. |
[params.range] | string | The range of values to update. |
[params.valueInputOption] | string | (Optional) Value update options. Defaults to 'USER_ENTERED' |
[params.values] | array | A 2d array of values to update. |
callback | function | (Optional) callback function |
Example
batchUpdateValues({
spreadsheetId: '1O-a4_RgPF_p8W3I6b5M9wobA3-CBW8hLClZfUik5sos',
range: 'Sheet1!A1:E1',
values: [
['From expression', '$15', '2', '3/15/2016'],
['Really now!', '$100', '1', '3/20/2016'],
],
})
getValues
getValues(spreadsheetId, range, callback) ⇒ Operation
Gets cell values from a Spreadsheet.
Returns: Operation
- spreadsheet information
Param | Type | Description |
---|---|---|
spreadsheetId | string | The spreadsheet ID. |
range | string | The sheet range. |
callback | function | (Optional) callback function |
Example
getValues('1O-a4_RgPF_p8W3I6b5M9wobA3-CBW8hLClZfUik5sos','Sheet1!A1:E1')