Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to skip hidden rows while iterating through Google Spreadsheet w/ Google Apps Script

I have a Google Spreadsheet with many hidden rows in it, and I want to skip them when iterating through a list of rows in the spreadsheet.

It's mainly an efficiency issue, as I'm dealing with over half of my rows being hidden and in no need of being checked.

Any help would be appreciated.

like image 449
kevlar1818 Avatar asked Jul 22 '11 17:07

kevlar1818


People also ask

How do I exclude hidden rows in Google Sheets?

You can omit hidden or filtered out values in the sum in Google Sheets. But not with the normal SUM function. For this, you should use the function SUBTOTAL with function number 9 (omits/excludes filtered out rows) or 109 (omits/excludes filtered out rows, hidden rows and as well as grouped rows).

How do I dynamically hide rows in Google Sheets?

To hide a row, select the row you want to hide and then click on the "hide" button in the toolbar. Another way to hide a row is to use the filter function. To hide a row using the filter function, select the row you want to hide and then click on the filter button in the toolbar.

How do I skip every other row in Google Sheets?

Similar to the LIMIT clause, you can use the SKIPPING clause in Query to skip a certain number of Rows in Google Sheets. For example, you can skip 1 row, 2 rows, 3 rows, etc., in a range. The Query formula used in the below example returns the values after skipping every alternate row, which means every 1 row.


1 Answers

There's no direct way of doing this in Apps Script, but there is a feature request open to provide a way get the show/hide status of a row, if you want to star it.

like image 84
Jan Kleinert Avatar answered Oct 07 '22 02:10

Jan Kleinert