node-google-spreadsheet icon indicating copy to clipboard operation
node-google-spreadsheet copied to clipboard

Support getRangeByName()

Open alberttra opened this issue 4 years ago • 4 comments

Please add support getRangeByName(named_range)

alberttra avatar Jan 25 '21 18:01 alberttra

Hi @theoephraim where would I look to implement this in the repo?

I looked at loadCells but it looks like it just makes an external api call and updates the sheets.

Nate-Wilkins avatar Dec 13 '22 04:12 Nate-Wilkins

@alberttra @theoephraim I've created a PR with support for this. Do you guys have any feedback that you'd like to get in?

I think this could be modified to return GoogleSpreadsheetRow[] instead of GoogleSpreadsheetCell[][] but I needed something working for a bit.

Let me know what you think!

Nate-Wilkins avatar Dec 14 '22 21:12 Nate-Wilkins

I'm not quite sure I understand. I think @alberttra is asking for functionality to load things based on named ranges.

There is a bit of work there to be able to load the named ranges that exist, create new ones, update them, etc... and then also to load cells based on them.

It looks like what you want is a bit of an easier way to just grab a bunch of cells (from the loaded cache) at once based on a name?

theoephraim avatar Dec 14 '22 21:12 theoephraim

Ah, okay! That is not what I implement as I needed a way to query data more conventionally from the call site. I'll close the PR but let me know if you'd like me to open another issue with the functionality that I was working on.

Thanks! Have a good one.

Nate-Wilkins avatar Jan 30 '23 15:01 Nate-Wilkins