function Defaulters() {
var spreadsheet = SpreadsheetApp.getActive();
var as = spreadsheet.getActiveSheet();
//获取列的最后一行
var lastRow = 100;
var range = as.getRange("N" + lastRow);
if (range.getValue() !== "")
{Logger.log(lastRow);}
{lastRow = range.getNextDataCell(SpreadsheetApp.Direction.UP).getRow();}
Logger.log(lastRow);
//删除空单元格并在列中提供姓名和电子邮件的压缩输出
for (var l=lastRow; l>=3; l--)
{if(as.getRange(l,14).getValue() == "")
Logger.log(true);**//what to put here to delete this row?**
else
Logger.log(false);**// what to put here to retain value?**
} }
1条答案
按热度按时间ggazkfy81#
我想试试这样的东西:
甚至像这样: