Is it possible to get the filter criteria of my data set. For example, if one of my column is \"Department\" and I filtered the data to display only \"IT\". How do we get th
This as raised in Google's Issue Tracker as Issue #36753410.
As of 2018-04-12, they have posted a solution:
Yesterday we released some new functionality that makes it possible to manipulate filters with Apps Script:
- https://developers.google.com/apps-script/reference/spreadsheet/range#createFilter()
- https://developers.google.com/apps-script/reference/spreadsheet/sheet#getfilter
- https://developers.google.com/apps-script/reference/spreadsheet/filter
Unfortunately Apps Script still doesn't have methods for determining if a given row or column is hidden by the filter. See comment #157 for a workaround utilizing the Sheets Advanced Service.
The Filter class lets you get the FilterCriteria for each column in turn.