Excellent ! That will be GREAT if you make that dynamic for example I have a time table in excel sheet for certain days of the week and each event duration also would be customized (15 min, 39 min. etc) and I let students book a meeting through google form for example. One more important thing, there should not be duplicated events and that can be solved by eliminating booked slots from the time table in the sheet so students can book from left available slots. Thank you. BTW, do you do paid freelance tasks like this?! Thank you.
Best tutorial I have found, due to the ease of explanation and simplicity. You used understandable commands, many use commands and script language I have to go research to figure out. Thank you very much for this! How easy would it be to extract the event data from the last row of a gsheet? I have an appsheet which adds the calendar data to a gsheet... but so I don't get duplicates, I would need to only add the last row each time and event was created.
Hi Kurt, Thanks for the kind words. You could use a custom onChange trigger to do this and extract the last row with something like this: function lastRow(){ const URL = "" const SheetName = "" const ss = SpreadsheetApp.openByUrl(URL) const sheet = ss.getSheetByName(SheetName) const lastRow = sheet.getActiveRangeList() // Gets the last row with data in it. return sheet.getRange(`${lastRow}:${lastRow}`).getValues() // you can change this to include a column range e.g. `$A{lastRow}:K${lastRow}` } developers.google.com/apps-script/guides/triggers Alternatively, you could make it part of the workflow for your AppSheet project with some apps script, but the setup is currently a little bit trickier. support.google.com/appsheet/answer/11997142?hl=en
I have several events that are are one day - but we don't specify the time. As a result I get Exception: Event start date must be before event end date. How can I work around that?
This was great. Easy to follow and really well done. Thank you!
Glad it was helpful!
Excellent ! That will be GREAT if you make that dynamic for example I have a time table in excel sheet for certain days of the week and each event duration also would be customized (15 min, 39 min. etc) and I let students book a meeting through google form for example. One more important thing, there should not be duplicated events and that can be solved by eliminating booked slots from the time table in the sheet so students can book from left available slots. Thank you.
BTW, do you do paid freelance tasks like this?!
Thank you.
Great use case. I'm sure other viewers will draw some inspiration from it.
Yes, I do consult, but am currently booked out until the new year.
Best tutorial I have found, due to the ease of explanation and simplicity. You used understandable commands, many use commands and script language I have to go research to figure out. Thank you very much for this!
How easy would it be to extract the event data from the last row of a gsheet?
I have an appsheet which adds the calendar data to a gsheet... but so I don't get duplicates, I would need to only add the last row each time and event was created.
Hi Kurt, Thanks for the kind words. You could use a custom onChange trigger to do this and extract the last row with something like this:
function lastRow(){
const URL = ""
const SheetName = ""
const ss = SpreadsheetApp.openByUrl(URL)
const sheet = ss.getSheetByName(SheetName)
const lastRow = sheet.getActiveRangeList() // Gets the last row with data in it.
return sheet.getRange(`${lastRow}:${lastRow}`).getValues() // you can change this to include a column range e.g. `$A{lastRow}:K${lastRow}`
}
developers.google.com/apps-script/guides/triggers
Alternatively, you could make it part of the workflow for your AppSheet project with some apps script, but the setup is currently a little bit trickier. support.google.com/appsheet/answer/11997142?hl=en
I have several events that are are one day - but we don't specify the time. As a result I get
Exception: Event start date must be before event end date. How can I work around that?
Hmm. I'm not too sure what is occurring for you without seeing a sample of your code. How are you iterating over the events that you are creating?