How it works
CalendarApp.getDefaultCalendar() picks the user's primary calendar — the one tied to the Google account the script runs as. For shared/team calendars, swap to CalendarApp.getCalendarById('<calendar id>').
getEvents(start, end) includes events that overlap the reporting window. A handover from 08:30 to 09:30 appears in a report starting at 09:00. The end of the window is exclusive.
The clearContent() step is what makes the script idempotent. Without it, every run would append duplicates. Header row stays — only data rows get wiped.