好的,这是我的导致错误的代码。这似乎只是我尝试添加全天事件的行。我认为这是一个日期格式问题,但我在它下面注释掉的那行是为了测试它而创建的,它导致了同样的错误。所以我很难过。需要更改什么来纠正错误,或者错误的实际含义是什么。
function cal1() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 2; // First row of data to process
var numRows = 300; // Number of rows to process
var dataRange = sheet.getRange(startRow, 1, numRows, 26); //What data will be used
var data = dataRange.getValues();
var cal = CalendarApp.getCalendarsByName("Production Schedule"); //Gets the correct calendar
for (i in data) {
var row = data[i];
var title = row[4]; // Column with Title
var desc = row[3]; // Column with Description
var date = row[8]; //Column with Date
var loc = row[5]; //Column with Location
cal.createAllDayEvent(title, date, {description:desc,location:loc});
//cal.createEvent("Test", new Date("3/10/2010 14:30:00"), new Date("3/10/2010 14:30:00"));
}
}