theoephraim / node-google-spreadsheet

Google Sheets API wrapper for Javascript / Typescript
https://theoephraim.github.io/node-google-spreadsheet
The Unlicense
2.31k stars 391 forks source link

loadCells then getRows? #578

Closed Frankusky closed 1 year ago

Frankusky commented 2 years ago

I have an issue, lets say I have a sheet with two tables of data, for example, something like this: image

I just want to get A2:B3 data, so what im making is sheet.loadCells("A2:B3"), but how can I loop over each row cell? I see the only way is to use getCell or getCellByA1 manually... there is no other method that can return like an array of arrays? for example, something like

[
  [123, 345],
  [asd, rgt]
]
theoephraim commented 1 year ago

Sounds like you may want to use the row-based API - https://theoephraim.github.io/node-google-spreadsheet/#/classes/google-spreadsheet-worksheet?id=working-with-rows