我正在尝试完成脚本以发送电子邮件以对谷歌工作表上的特定选项卡进行任何编辑,但我一直给我这个错误:
TypeError:无法读取未定义的属性(读取“范围”)
我的剧本是:
function sendEditNotification(e){
if (e.range.columnStart != 6 || e.value != "Checked in") return;
const rData = e.source.getActiveSheet().getSheetByName("Daily PSP List").getRange().getValues();
let Names = rData[1][3];
let Email = "[email protected]";
let Year = rData[1][3];
let Duration = rData[3][3];
let msg = "Hi, " + Names + " has been marked " + CurrentStatus
MailApp.sendEmail(email, "PSP attendance", msg)
有人能告诉我我做错了什么请帮忙吗?提前谢谢你。
帮忙改正剧本