Apps Script公式リファレンス: Apps Script Reference |障害・課題追跡: IssueTracker |Google Workspace: Status Dashboard - Summary


Get Hidden Rows in Google Sheets with Google Apps Script


Google Sheets allows you to hide rows and columns. 
Hidden rows are not displayed on the sheet and cannot be edited.

To get hidden rows, you can use Google Apps Script. 
Google Apps Script provides the isRowHiddenByUser() method in the Sheet class to determine if a specified row is hidden.

Source Code
function getHiddenRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var lastRow = sheet.getLastRow();
var range = sheet.getRange("A1:A" + lastRow);
var values = range.getValues();
var hiddenRows = [];
for(var i = 0; i < values.length; i++) {
var row = i + 1
var hidden = sheet.isRowHiddenByUser(row);
if(hidden) {
Logger.log(["hiddenRows: ", hiddenRows]);



Latest post

Google Slidesで現在選択している表に値を入れたい3 - Insert values into the active table3

Google Slidesで現在選択している表に値を入れたい2 - Insert values into the active table2 上記のリンク先では、値の数に応じて行を追加しました。 In the linked article above, rows were add...