This is a sample script for retrieving values from filtered Sheet in Spreadsheet using Google Apps Script. When the values are retrieved the filtered sheet by the basic filter, if setValues()
and setDisplayValues()
are used, all values without the filter are retrieved. In this script, I would like to introduce the method for retrieving the values from the filtered sheet using Google Apps Script.
In order to retrieve the values from the filtered sheet, one method has already been proposed. That method retrieved the values from the filtered sheet by retrieving columnMetadata
and rowMetadata
of the method of spreadsheet.get of Sheets API. In this case, the rows and columns hidden by the filter can be retrieved.
In this sample script, columnMetadata
and rowMetadata
of the method of spreadsheet.get of Sheets API are not used. The values are directly retrieved.