Google Script Delete Line

[Solved] Google Script Delete Line | Excel - Code Explorer | yomemimo.com
Question : google script delete line

Answered by : huldar

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 : https://stackoverflow.com/questions/37924842/deleting-rows-in-google-sheets-using-google-apps-script | Last Update : Wed, 04 Aug 21

Answers related to google script delete line

Code Explorer Popular Question For Excel