I have a spreadsheet with +250 lines of prospects. For each prospect I have a row in wish I inform the date we are supposed to meet.
I have tried to create a script so that the dates I input on the cell are automatically transformed into Google Calendar Events.
Still, each time I run the script I get the "Cannot find method (string, string, string)" error message.
I don't know if the fact that I have several blank cells is the problem.
There goes the code I tried to run:
function scheduleshifts() {
var Spreadsheet = SpreadsheetApp.getActiveSheet();
var CalendarId = Spreadsheet.getRange("Y2").getValue();
var eventcal = CalendarApp.getCalendarById(CalendarId);
var signups = Spreadsheet.getRange("C3:V250").getValues();
for (x=0; x<signups.length; x++){
var shift = signups [x];
var startTime = shift[18];
var endTime = shift[19];
var title = shift[0];
eventcal.createEvent(title, new Date(startTime), new Date(endTime));
}
}