我已经设置了一个 Google 表单来提交带有“批准”或“拒绝”的电子邮件。在电子邮件中单击任一按钮后,它应输入电子表格中的字段。相反,我收到以下错误:找不到方法(类)(类)getRange((类),数字)
var ss = SpreadsheetApp.openById('0AgiQ-iVBgD0HdDd3Xzh2aXJVRmRjQkI5dmhkd0pSMnc');
var sheet = ss.getSheets()[0];
var lastRowNum = sheet.getLastRow();
var range = "A1:A"+lastRowNum;
var allResponseIDs = sheet.getRange(1, 1, lastRowNum, 1);
var cellValues = allResponseIDs.getValues();
var year = e.year;
var month = e.month;
var day = e["day-of-month"];
var today = month+'/'+day+'/'+year;
for(var i = 1; i <= lastRowNum; i++) {
if(cellValues[i] === responseID) {
var rowNumber = i;
}
}
var preApproved = sheet.getRange(rowNumber, 14, 1, 1);
if (!preApproved) {
// Set the 1st level approval
if (approvalOne === 'true') {
sheet.getRange(rowNumber, 14, 1, 1).setValue(true);
} else {
sheet.getRange(rowNumber, 14, 1, 1).setValue(false);
}
sheet.getRange(rowNumber, 15, 1, 1).setValue(today);
有什么建议么?