Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

google script delete line

for (var i = max_rows; i>=0; i--) {
  sheet.deleteRow(row_del[i]); 
}

//Start from the bottom if you need to delete many rows because
// When a row is deleted from a sheet, the rows below it get
// renumbered even as the script continues to run.
// If the script subsequently tries to also delete those rows, or
// manipulate them in any other way, the result is unpredictable.
// For this reason, when deleting rows one should proceed from
// bottom to top.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #google #script #delete #line
ADD COMMENT
Topic
Name
7+4 =