showing results for - "google script delete line"
Mehdi
08 Feb 2020
1for (var i = max_rows; i>=0; i--) {
2  sheet.deleteRow(row_del[i]); 
3}
4
5//Start from the bottom if you need to delete many rows because
6// When a row is deleted from a sheet, the rows below it get
7// renumbered even as the script continues to run.
8// If the script subsequently tries to also delete those rows, or
9// manipulate them in any other way, the result is unpredictable.
10// For this reason, when deleting rows one should proceed from
11// bottom to top.