I haven't found a solution on this yet. I have a result spreadsheet from a formula on which I have to delete some rows from time to time. I am using this:
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var values = rows.getValues();
var rowsDeleted = 0;
for (var i = 0; i <= numRows - 1; i++) {
var row = values[i];
if (row[9] > 1) {
sheet.deleteRow((parseInt(i) + 1) - rowsDeleted);
rowsDeleted++;
}
}
};
The issue here is that google form doesn't decrease the counter and I only have found a solution where you can set the form counter to 0. I don't want the formula to continue on row x though I deleted some rows before. Is there a solution to this?