Google Sheets copy and paste row into another sheet and then delete content from the first sheet

喜夏-厌秋 提交于 2019-12-06 15:36:27

To clear the contents replace sheet.clearContents(row) with

range.clearContent();

However may I suggest that you simply delete the row by replacing sheet.clearContents(row) with

sheet.deleteRow(row);

and then if you really want the same number of rows you can insert a row

sheet.insertRowsAfter(sheet.getMaxRows(), 1);

which should retain the formatting of the very last row of the sheet.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!