I'm currently using this script to hide rows containing 0 on col K
function Hide() {
var s = SpreadsheetApp.getActive()
.getSheetByName('Sheet1');
s.getRange('K:K')
.getValues()
.forEach(function (r, i) {
if (r[0] !== '' && r[0].toString()
.charAt(0) == 0) s.hideRows(i + 1)
});
}
Which works perfect, the only thing is that here when I run the script, it hides row by row (now that I have a lot of rows it takes so much time).
Is there a way to change it to work in batch?