1
我需要使用Google Apps腳本(刪除單元格或整行)在Google電子表格中記錄刪除事件並獲取單元格號和用戶名。如何在Google電子表格中記錄刪除事件
功能onEdit(e)
在單元格編輯時觸發,而不是在刪除時觸發。
function onEdit(e)
{
var range = e.range;
Logger.log(range.getRow());
Logger.log(Session.getActiveUser().getEmail());
if (range.getRow() === 3.0)
{
var recipient = "[email protected]";
var subject = 'Roster Notification';
MailApp.sendEmail(recipient, subject, "Hello, your roster has been updated. Please check. Thanks.");
}
}