browser-samples
browser-samples copied to clipboard
Mentioning the range or cells for writing data to a spreadsheet.
Summary
I was referring the doc https://developers.google.com/sheets/api/guides/values#write_to_a_single_range to write some values to a spreadsheet. I requires to input the range of cells to write the data. However as the data I write is in a js object I wouldn't know in advance how may rows or columns it occupies. In this case how should I mention the range?
gapi.client.sheets.spreadsheets.values.update({
spreadsheetId: spreadsheetId,
range: range,
valueInputOption: valueInputOption,
resource: body,
})