googleworkspace / browser-samples

Web samples for Google Workspace APIs
Apache License 2.0
326 stars 559 forks source link

Mentioning the range or cells for writing data to a spreadsheet. #166

Open arunkumar413 opened 1 year ago

arunkumar413 commented 1 year ago

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,
    })