📌  相关文章
📜  谷歌脚本删除行 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:55.290000             🧑  作者: Mango

代码示例1
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.