如何使用 Apps 脚本删除 Google 表格中的行?

How to delete rows in Google Sheets using Apps Script?

我是脚本新手,想为我的 Google Sheet.

利用 Google 的 Apps 脚本

我正在使用来自 Google Workplace Marketplace 的报告连接器,由于默认程序,它引入了不必要的数据。

我只需要一个脚本来自动删除 Google Sheet 中的前 7 行。它不依赖于文本,它们只需要被删除。

提前致谢!

function drows() {
  SpreadsheetApp.getActiveSheet().deleteRows(1,7);
}