Skip to main content

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

ParamTypeDescription
paramsObjectData object to add to the spreadsheet.
[params.spreadsheetId]stringThe spreadsheet ID.
[params.range]stringThe range of values to update.
[params.values]arrayA 2d array of values to update.
callbackfunction(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

ParamTypeDescription
paramsObjectData object to add to the spreadsheet.
[params.spreadsheetId]stringThe spreadsheet ID.
[params.range]stringThe range of values to update.
[params.valueInputOption]string(Optional) Value update options. Defaults to 'USER_ENTERED'
[params.values]arrayA 2d array of values to update.
callbackfunction(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

ParamTypeDescription
spreadsheetIdstringThe spreadsheet ID.
rangestringThe sheet range.
callbackfunction(Optional) callback function

Example

getValues('1O-a4_RgPF_p8W3I6b5M9wobA3-CBW8hLClZfUik5sos','Sheet1!A1:E1')