Closed retroflex closed 3 months ago
@retroflex
You can't currently do this with the module directly, but you can accomplish this by creating a new sheet that does the filtering for you, and then you can import that sheet into the module.
What is the use case if you don't mind me asking? If it something that a lot of people will use I can add it in a future version.
My use case is I use a sheet for my kids' weekly recurring activities for the family to keep up with everyday life. My partner wants to add different stuff to this, like comments (more rows) or more activites (more columns) easily. Not a big deal, just would be a nice feature.
Would love this!
There is getDataRange()
in Apps Script that could accomplish this. Let the user pass in 'auto' (or something like that) for the range and then in code.gs
if range is 'auto' then call getDataRange()
instead of getRange()
. This would be a simple way to not break existing users that are calling a fixed range.
https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet#getdatarange
@retroflex @brandonfake69
This feature has been added! Check out the updated README for more details.
Note that in order to use it, you will need to update to the latest version of the library (currently 20). Check out the README for details on how to do that. You will also need to redeploy your apps script (this is mentioned in the instructions on updating the library).
Thanks for the great suggestion! Please send me screenshots of you using the module so I can add them as inspiration for others in the README!
Nice module! Is there any way to automatically set the range (e.g. A1:B6) to include all non-empty cells in the sheet? In case I want to show a sheet that varies in nr of rows for example.