{"id":22503,"date":"2025-07-22T23:57:06","date_gmt":"2025-07-22T14:57:06","guid":{"rendered":"https:\/\/84office.jp\/?p=22503"},"modified":"2025-07-24T22:56:26","modified_gmt":"2025-07-24T13:56:26","slug":"calendar-schedule-get","status":"publish","type":"post","link":"https:\/\/84office.jp\/en\/calendar-schedule-get\/","title":{"rendered":"Export Google Calendar Events to a Spreadsheet\uff5cEasily Get Schedules for Multiple Users with Google Apps Script"},"content":{"rendered":"<div class=\"codoc-evacuations\" style=\"display:none;\" data-shortcode=\"\"><\/div>\n<p>Google Calendar is an incredibly useful tool that allows you to view multiple people\u2019s schedules all in one place.<\/p>\n\n\n\n<p>However, when your team has many members or a wide variety of schedules, it can sometimes become difficult to view everything clearly.<\/p>\n\n\n\n<p>For this reason, it\u2019s often easier to manage schedules by displaying them as a list in a Google Spreadsheet.<\/p>\n\n\n\n<p>In this article, I\u2019ll show you how to use Google Apps Script to retrieve events from multiple Google Calendars all at once and organize them in a single spreadsheet.<\/p>\n\n\n\n<p>By consolidating multiple users\u2019 schedules into one sheet, it becomes much easier to coordinate and adjust plans.<\/p>\n\n\n\n<p>For those who want to save time and start using this right away, we also offer a ready-to-use (paid) template with the script already set up.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">For more details, please see the article below.<\/p>\n\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-60\">\t\t\t<a href=\"https:\/\/84office.jp\/google-calendar-to-sheet-template\/\" class=\"c-blogLink -external\" data-style=\"text\" target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t<!-- <i class=\"c-blogLink__icon icon-link\" role=\"presentation\"><\/i> -->\n\t\t\t\t<span class=\"c-blogLink__icon\">\n\t\t\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-externalLink __svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M44 2H30c-1.1 0-2 .9-2 2s.9 2 2 2h9.2L24 21.2c-.8.8-.8 2 0 2.8s2 .8 2.8 0L42 8.8V18c0 1.1.9 2 2 2s2-.9 2-2V4c0-1.1-.9-2-2-2z\" \/><path d=\"M41 27c-1.1 0-2 .9-2 2v10c0 1.1-.9 2-2 2H9c-1.1 0-2-.9-2-2V11c0-1.1.9-2 2-2h10c1.1 0 2-.9 2-2s-.9-2-2-2H9c-3.3 0-6 2.7-6 6v28c0 3.3 2.7 6 6 6h28c3.3 0 6-2.7 6-6V29c0-1.1-.9-2-2-2z\" \/><\/svg>\t\t\t\t<\/span>\n\t\t\t\t<span class=\"c-blogLink__text\">Google\u30ab\u30ec\u30f3\u30c0\u30fc\u4e88\u5b9a\u4e00\u89a7\u51fa\u529b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff5c\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u00d7GAS | \u5408\u540c\u4f1a\u793e\u6a4b\u722a\u30aa\u30d5\u30a3\u30b9<\/span>\n\t\t\t<\/a>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-60\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/03\/7c73be541a256782f44e27e6dbbcd3cc-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/84office.jp\/gas-automation-summary\/\" target=\"_blank\" rel=\"noopener noreferrer\">Google Apps Script\uff08GAS\uff09\u3067\u3067\u304d\u308b\u3053\u3068\uff5c\u6d3b\u7528\u4f8b\u4e00\u89a7\u307e\u3068\u3081<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Google Apps Script\uff08GAS\uff09\u306f\u3001Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3084Google\u30c9\u30e9\u30a4\u30d6\u3001Gmail\u306a\u3069\u3001\u3055\u307e\u3056\u307e\u306aGoogle\u30b5\u30fc\u30d3\u30b9\u3092\u9023\u643a\u30fb\u81ea\u52d5\u5316\u3067\u304d\u308b\u4fbf\u5229\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading\">Sample Output<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large u-mb-ctrl u-mb-40 is-style-shadow\"><img decoding=\"async\" width=\"1024\" height=\"295\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-253-1024x295.png\" alt=\"\" class=\"wp-image-22520\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-253-1024x295.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-253-300x86.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-253-768x221.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-253-1536x442.png 1536w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-253.png 1772w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list has-border -border02 u-mb-ctrl u-mb-40 has-swl-pale-03-background-color has-background\">\n<li>Retrieve and list schedules from multiple members\u2019 Google Calendars<\/li>\n\n\n\n<li>View each member\u2019s events for a selected date range<\/li>\n<\/ul>\n\n\n\n<p>With Google Apps Script, you can organize information from each Google Calendar into a spreadsheet list.<\/p>\n\n\n\n<p>Fields Included:<\/p>\n\n\n\n<ul class=\"wp-block-list u-mb-ctrl u-mb-60\">\n<li>Calendar ID<\/li>\n\n\n\n<li>Title<\/li>\n\n\n\n<li>Description<\/li>\n\n\n\n<li>Start Date<\/li>\n\n\n\n<li>Start Time<\/li>\n\n\n\n<li>End Date<\/li>\n\n\n\n<li>End Time<\/li>\n\n\n\n<li>Location<\/li>\n\n\n\n<li>Guest Information<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Preparation Required<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Google Calendar Access Permissions<\/h3>\n\n\n\n<p>To retrieve schedules from another user\u2019s calendar, you need to be granted viewing access by that user.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">Here\u2019s how to set up calendar access permissions:<\/p>\n\n\n\n<div class=\"swell-block-accordion u-mb-ctrl u-mb-60\">\n<details class=\"swell-block-accordion__item\" data-swl-acc=\"wrapper\"><summary class=\"swell-block-accordion__title\" data-swl-acc=\"header\"><span class=\"swell-block-accordion__label\">How to Set Access Permissions<\/span><span class=\"swell-block-accordion__icon c-switchIconBtn\" data-swl-acc=\"icon\" aria-hidden=\"true\" data-opened=\"false\"><i class=\"__icon--closed icon-caret-down\"><\/i><i class=\"__icon--opened icon-caret-up\"><\/i><\/span><\/summary><div class=\"swell-block-accordion__body\" data-swl-acc=\"body\"><div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"840\" height=\"616\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-243.png\" alt=\"\" class=\"wp-image-22510\" style=\"width:508px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-243.png 840w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-243-300x220.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-243-768x563.png 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-50\">Open <a href=\"https:\/\/calendar.google.com\/calendar\/u\/0\/r\" target=\"_blank\" rel=\"noreferrer noopener\">Google Calendar<\/a> and click the settings icon in the top right corner of the screen.<\/p>\n\n\n<div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"584\" height=\"578\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-245.png\" alt=\"\" class=\"wp-image-22512\" style=\"width:326px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-245.png 584w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-245-300x297.png 300w\" sizes=\"(max-width: 584px) 100vw, 584px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-50\">In the menu on the left, go to \u201cSettings for my calendars\u201d and click on the calendar you want to use.<\/p>\n\n\n<div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"425\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-246-1024x425.png\" alt=\"\" class=\"wp-image-22513\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-246-1024x425.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-246-300x124.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-246-768x318.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-246.png 1360w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>On the calendar\u2019s detail settings page, scroll down until you see \u201cShare with.\u201d<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-60\">Click \u201cAdd people or groups\u201d within that section.<\/p>\n\n\n<div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"932\" height=\"522\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-247.png\" alt=\"\" class=\"wp-image-22514\" style=\"width:491px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-247.png 932w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-247-300x168.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-247-768x430.png 768w\" sizes=\"(max-width: 932px) 100vw, 932px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-60\">Set the permission level to \u201cSee all event details\u201d before sharing.<\/p>\n\n\n<div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"478\" height=\"420\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-249.png\" alt=\"\" class=\"wp-image-22516\" style=\"width:309px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-249.png 478w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-249-300x264.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/figure>\n<\/div>\n\n\n<p>The shared calendar will appear under \u201cOther calendars.\u201d<br>If it does not show up even after sharing, try the following steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click the sharing notification link sent by email.<\/li>\n<\/ul>\n\n\n\n<p>or<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click the \u201c+\u201d next to \u201cOther calendars\u201d<\/li>\n\n\n\n<li>Select \u201cSubscribe to calendar\u201d<\/li>\n\n\n\n<li>Click \u201cAdd calendar\u201d<\/li>\n\n\n\n<li>Enter the Calendar ID<\/li>\n<\/ul>\n<\/div><\/details>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How to Check the Calendar ID<\/strong><\/h3>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40 is-style-shadow\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"352\" height=\"170\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-260.png\" alt=\"\" class=\"wp-image-22529\" style=\"width:237px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-260.png 352w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-260-300x145.png 300w\" sizes=\"(max-width: 352px) 100vw, 352px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-40\">You can find the \u201cCalendar ID\u201d on the settings page of the calendar you want to access.<br>Usually, the Calendar ID is in the form of an email address, but for company or shared calendars, a different type of ID may be displayed.<\/p>\n\n\n\n<div class=\"swell-block-accordion u-mb-ctrl u-mb-60\">\n<details class=\"swell-block-accordion__item\" data-swl-acc=\"wrapper\"><summary class=\"swell-block-accordion__title\" data-swl-acc=\"header\"><span class=\"swell-block-accordion__label\">How to Find Your Google Calendar ID<\/span><span class=\"swell-block-accordion__icon c-switchIconBtn\" data-swl-acc=\"icon\" aria-hidden=\"true\" data-opened=\"false\"><i class=\"__icon--closed icon-caret-down\"><\/i><i class=\"__icon--opened icon-caret-up\"><\/i><\/span><\/summary><div class=\"swell-block-accordion__body\" data-swl-acc=\"body\"><div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"840\" height=\"616\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-243.png\" alt=\"\" class=\"wp-image-22510\" style=\"width:508px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-243.png 840w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-243-300x220.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-243-768x563.png 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-60\">Open <a href=\"https:\/\/calendar.google.com\/calendar\/u\/0\/r\" target=\"_blank\" rel=\"noreferrer noopener\">Google Calendar<\/a> and click the settings icon in the top right corner.<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40 is-style-shadow\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"478\" height=\"420\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-250.png\" alt=\"\" class=\"wp-image-22517\" style=\"width:309px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-250.png 478w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-250-300x264.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-50\">In the menu on the left, go to \u201cSettings for my calendars\u201d and click on the calendar you want to use.<\/p>\n\n\n<div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"569\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-252-1024x569.png\" alt=\"\" class=\"wp-image-22519\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-252-1024x569.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-252-300x167.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-252-768x427.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-252.png 1274w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>On the calendar\u2019s detail settings page, scroll down and you will see the \u201cCalendar ID.\u201d<\/p>\n\n\n\n<p>Typically, the Calendar ID is in the format \u201c<a>xxx@gmail.com<\/a>\u201d or \u201c<a>xxxx@group.calendar.google.com<\/a>.\u201d<\/p>\n<\/div><\/details>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\">Step-by-Step Instructions<\/h2>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">In the script, you specify multiple calendar IDs. The script then retrieves events from each calendar within the specified period and outputs them to the spreadsheet.<\/p>\n\n\n\n<div class=\"swell-block-step u-mb-ctrl u-mb-60\" data-num-style=\"circle\">\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>Prepare Your Spreadsheet<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"563\" height=\"96\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/10\/image-126.png\" alt=\"\" class=\"wp-image-15536\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/10\/image-126.png 563w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/10\/image-126-300x51.png 300w\" sizes=\"(max-width: 563px) 100vw, 563px\" \/><\/figure>\n<\/div>\n\n\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\"><strong>Entering Calendar IDs<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li>Starting from cell B1, enter the Google Calendar IDs (usually email addresses) that you want to retrieve events from, moving to the right (B1, C1, D1, etc.).<\/li>\n\n\n\n<li>If you want to manage multiple calendars at once, enter each calendar ID in B1, C1, D1, and so on.<\/li>\n\n\n\n<li>You can find the Calendar ID on the settings page of each calendar.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Set the Retrieval Period<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li><strong>Cell B2:<\/strong> Enter the start date for retrieving events (e.g., 01\/11\/2024).<\/li>\n\n\n\n<li><strong>Cell B3:<\/strong> Enter the end date for retrieving events (e.g., 08\/11\/2024).<\/li>\n<\/ul>\n\n\n\n<p>With this setup, only events within the specified period will be exported to the spreadsheet.<br><\/p>\n<\/dd>\n<\/dl>\n\n\n\n<p><strong><strong>Setting the Sheet Name<\/strong><\/strong><\/p>\n\n\n\n<p>In this example, set the sheet name of your spreadsheet to \u201cSchedule List.\u201d<br>The script will use this sheet name when referencing the sheet.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Open the Apps Script Editor<\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"933\" height=\"591\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/98efceb7a335447039dff05eb8d70d3d.png\" alt=\"\" class=\"wp-image-16537\" style=\"width:447px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/98efceb7a335447039dff05eb8d70d3d.png 933w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/98efceb7a335447039dff05eb8d70d3d-300x190.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/98efceb7a335447039dff05eb8d70d3d-768x486.png 768w\" sizes=\"(max-width: 933px) 100vw, 933px\" \/><\/figure>\n<\/div>\n\n\n<p>Open your Google Spreadsheet, click on \u201cExtensions\u201d in the menu, and select \u201cApps Script\u201d to open the editor.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong><strong><strong>Create the Script<\/strong><\/strong><\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40 is-style-shadow\">\n<figure class=\"alignleft size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"472\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662-1024x472.png\" alt=\"\" class=\"wp-image-16191\" style=\"width:821px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662-1024x472.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662-300x138.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662-768x354.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662.png 1387w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>function myFunction(){<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">is included from the beginning, so delete it and paste the previous script.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>function exportCalendarEvents() {\n  const sheetName = \"Schedule List\"; \/\/ Name of the sheet to output data\n  const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);\n\n  \/\/ Error check: Sheet existence\n  if (!sheet) {\n    Logger.log(`Error: The sheet \"${sheetName}\" was not found. Please create the sheet in your spreadsheet.`);\n    return;\n  }\n\n  \/\/ Get start and end dates\n  const startDate = new Date(sheet.getRange(\"B2\").getValue());\n  const endDate = new Date(sheet.getRange(\"B3\").getValue());\n\n  \/\/ Get calendar IDs from B1 to the right\n  const calendarIds = sheet.getRange(\"B1:1\").getValues()&#91;0&#93;.filter(id => id);\n\n  if (calendarIds.length === 0) {\n    Logger.log(\"Error: No calendar IDs entered. Please enter at least one calendar ID starting from cell B1.\");\n    return;\n  }\n\n  \/\/ Clear output area (rows 5 and below)\n  const lastRow = sheet.getLastRow();\n  if (lastRow >= 5) {\n    sheet.getRange(\"5:\" + lastRow).clear(); \/\/ Clear only from row 5 onward\n  }\n\n  \/\/ Add header in row 5\n  const headerRange = sheet.getRange(5, 1, 1, 9);\n  headerRange.setValues([&#91;\n    \"Calendar ID\",\n    \"Title\",\n    \"Description\",\n    \"Start Date\",\n    \"Start Time\",\n    \"End Date\",\n    \"End Time\",\n    \"Location\",\n    \"Guests\"\n  &#93;]);\n\n  \/\/ Center header text and set background color (Light Green 3)\n  headerRange.setHorizontalAlignment(\"center\");\n  headerRange.setBackground(\"#b7e1cd\");\n\n  \/\/ Function to get English day of week\n  function getDayOfWeek(date) {\n    const dayNames = &#91;\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"&#93;;\n    return dayNames&#91;date.getDay()&#93;;\n  }\n\n  let eventRows = [];\n\n  \/\/ Retrieve events for each calendar ID\n  calendarIds.forEach(calendarId => {\n    const calendar = CalendarApp.getCalendarById(calendarId);\n    if (!calendar) {\n      Logger.log(`Error: Calendar ID \"${calendarId}\" was not found.`);\n      return;\n    }\n\n    const events = calendar.getEvents(startDate, endDate);\n\n    events.forEach(event => {\n      const startDateTime = event.getStartTime();\n      const endDateTime = event.getEndTime();\n\n      \/\/ Add day of the week in English to the date\n      const startDateFormatted = Utilities.formatDate(startDateTime, Session.getScriptTimeZone(), \"dd\/MM\/yyyy\") + ` (${getDayOfWeek(startDateTime)})`;\n      const endDateFormatted = Utilities.formatDate(endDateTime, Session.getScriptTimeZone(), \"dd\/MM\/yyyy\") + ` (${getDayOfWeek(endDateTime)})`;\n\n      \/\/ Get guest emails, separated by commas\n      const guestList = event.getGuestList().map(guest => guest.getEmail()).join(\", \");\n\n      eventRows.push(&#91;\n        calendarId,\n        event.getTitle(),\n        event.getDescription(),\n        startDateFormatted,\n        Utilities.formatDate(startDateTime, Session.getScriptTimeZone(), \"HH:mm\"),\n        endDateFormatted,\n        Utilities.formatDate(endDateTime, Session.getScriptTimeZone(), \"HH:mm\"),\n        event.getLocation(),\n        guestList\n      &#93;);\n    });\n  });\n\n  \/\/ Output events from row 6 downward\n  if (eventRows.length > 0) {\n    sheet.getRange(6, 1, eventRows.length, 9).setValues(eventRows);\n  }\n\n  Logger.log(`A total of ${eventRows.length} events have been exported to the sheet \"${sheetName}\".`);\n}\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">exportCalendarEvents<\/span><span style=\"color: #F8F8F2\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> sheetName <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E6DB74\">&quot;Schedule List&quot;<\/span><span style=\"color: #F8F8F2\">; <\/span><span style=\"color: #88846F\">\/\/ Name of the sheet to output data<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> sheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getActiveSpreadsheet<\/span><span style=\"color: #F8F8F2\">().<\/span><span style=\"color: #A6E22E\">getSheetByName<\/span><span style=\"color: #F8F8F2\">(sheetName);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Error check: Sheet existence<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">sheet) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">`Error: The sheet &quot;<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">sheetName<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">&quot; was not found. Please create the sheet in your spreadsheet.`<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Get start and end dates<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> startDate <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">new<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">Date<\/span><span style=\"color: #F8F8F2\">(sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;B2&quot;<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValue<\/span><span style=\"color: #F8F8F2\">());<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> endDate <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">new<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">Date<\/span><span style=\"color: #F8F8F2\">(sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;B3&quot;<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValue<\/span><span style=\"color: #F8F8F2\">());<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Get calendar IDs from B1 to the right<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> calendarIds <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;B1:1&quot;<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValues<\/span><span style=\"color: #F8F8F2\">()&#91;<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">&#93;.<\/span><span style=\"color: #A6E22E\">filter<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">id<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF; font-style: italic\">=&gt;<\/span><span style=\"color: #F8F8F2\"> id);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (calendarIds.length <\/span><span style=\"color: #F92672\">===<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Error: No calendar IDs entered. Please enter at least one calendar ID starting from cell B1.&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Clear output area (rows 5 and below)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> lastRow <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getLastRow<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (lastRow <\/span><span style=\"color: #F92672\">&gt;=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">5<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;5:&quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> lastRow).<\/span><span style=\"color: #A6E22E\">clear<\/span><span style=\"color: #F8F8F2\">(); <\/span><span style=\"color: #88846F\">\/\/ Clear only from row 5 onward<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Add header in row 5<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> headerRange <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">5<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">9<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  headerRange.<\/span><span style=\"color: #A6E22E\">setValues<\/span><span style=\"color: #F8F8F2\">([&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Calendar ID&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Title&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Description&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Start Date&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Start Time&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;End Date&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;End Time&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Location&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Guests&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  &#93;]);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Center header text and set background color (Light Green 3)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  headerRange.<\/span><span style=\"color: #A6E22E\">setHorizontalAlignment<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;center&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  headerRange.<\/span><span style=\"color: #A6E22E\">setBackground<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;#b7e1cd&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Function to get English day of week<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">getDayOfWeek<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">date<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> dayNames <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> &#91;<\/span><span style=\"color: #E6DB74\">&quot;Sun&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Mon&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Tue&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Wed&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Thu&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Fri&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Sat&quot;<\/span><span style=\"color: #F8F8F2\">&#93;;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\"> dayNames&#91;date.<\/span><span style=\"color: #A6E22E\">getDay<\/span><span style=\"color: #F8F8F2\">()&#93;;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">let<\/span><span style=\"color: #F8F8F2\"> eventRows <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> [];<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Retrieve events for each calendar ID<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  calendarIds.<\/span><span style=\"color: #A6E22E\">forEach<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">calendarId<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF; font-style: italic\">=&gt;<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> calendar <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> CalendarApp.<\/span><span style=\"color: #A6E22E\">getCalendarById<\/span><span style=\"color: #F8F8F2\">(calendarId);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">calendar) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">`Error: Calendar ID &quot;<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">calendarId<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">&quot; was not found.`<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> events <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> calendar.<\/span><span style=\"color: #A6E22E\">getEvents<\/span><span style=\"color: #F8F8F2\">(startDate, endDate);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    events.<\/span><span style=\"color: #A6E22E\">forEach<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">event<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF; font-style: italic\">=&gt;<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> startDateTime <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> event.<\/span><span style=\"color: #A6E22E\">getStartTime<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> endDateTime <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> event.<\/span><span style=\"color: #A6E22E\">getEndTime<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #88846F\">\/\/ Add day of the week in English to the date<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> startDateFormatted <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> Utilities.<\/span><span style=\"color: #A6E22E\">formatDate<\/span><span style=\"color: #F8F8F2\">(startDateTime, Session.<\/span><span style=\"color: #A6E22E\">getScriptTimeZone<\/span><span style=\"color: #F8F8F2\">(), <\/span><span style=\"color: #E6DB74\">&quot;dd\/MM\/yyyy&quot;<\/span><span style=\"color: #F8F8F2\">) <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E6DB74\">` (<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #A6E22E\">getDayOfWeek<\/span><span style=\"color: #F8F8F2\">(startDateTime)<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">)`<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> endDateFormatted <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> Utilities.<\/span><span style=\"color: #A6E22E\">formatDate<\/span><span style=\"color: #F8F8F2\">(endDateTime, Session.<\/span><span style=\"color: #A6E22E\">getScriptTimeZone<\/span><span style=\"color: #F8F8F2\">(), <\/span><span style=\"color: #E6DB74\">&quot;dd\/MM\/yyyy&quot;<\/span><span style=\"color: #F8F8F2\">) <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E6DB74\">` (<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #A6E22E\">getDayOfWeek<\/span><span style=\"color: #F8F8F2\">(endDateTime)<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">)`<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #88846F\">\/\/ Get guest emails, separated by commas<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> guestList <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> event.<\/span><span style=\"color: #A6E22E\">getGuestList<\/span><span style=\"color: #F8F8F2\">().<\/span><span style=\"color: #A6E22E\">map<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">guest<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF; font-style: italic\">=&gt;<\/span><span style=\"color: #F8F8F2\"> guest.<\/span><span style=\"color: #A6E22E\">getEmail<\/span><span style=\"color: #F8F8F2\">()).<\/span><span style=\"color: #A6E22E\">join<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;, &quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      eventRows.<\/span><span style=\"color: #A6E22E\">push<\/span><span style=\"color: #F8F8F2\">(&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        calendarId,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        event.<\/span><span style=\"color: #A6E22E\">getTitle<\/span><span style=\"color: #F8F8F2\">(),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        event.<\/span><span style=\"color: #A6E22E\">getDescription<\/span><span style=\"color: #F8F8F2\">(),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        startDateFormatted,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        Utilities.<\/span><span style=\"color: #A6E22E\">formatDate<\/span><span style=\"color: #F8F8F2\">(startDateTime, Session.<\/span><span style=\"color: #A6E22E\">getScriptTimeZone<\/span><span style=\"color: #F8F8F2\">(), <\/span><span style=\"color: #E6DB74\">&quot;HH:mm&quot;<\/span><span style=\"color: #F8F8F2\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        endDateFormatted,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        Utilities.<\/span><span style=\"color: #A6E22E\">formatDate<\/span><span style=\"color: #F8F8F2\">(endDateTime, Session.<\/span><span style=\"color: #A6E22E\">getScriptTimeZone<\/span><span style=\"color: #F8F8F2\">(), <\/span><span style=\"color: #E6DB74\">&quot;HH:mm&quot;<\/span><span style=\"color: #F8F8F2\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        event.<\/span><span style=\"color: #A6E22E\">getLocation<\/span><span style=\"color: #F8F8F2\">(),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        guestList<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      &#93;);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    });<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  });<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Output events from row 6 downward<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (eventRows.length <\/span><span style=\"color: #F92672\">&gt;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">6<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">, eventRows.length, <\/span><span style=\"color: #AE81FF\">9<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">setValues<\/span><span style=\"color: #F8F8F2\">(eventRows);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">`A total of <\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">eventRows.length<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\"> events have been exported to the sheet &quot;<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">sheetName<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">&quot;.`<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"swell-block-accordion u-mb-ctrl u-mb-60\">\n<details class=\"swell-block-accordion__item\" data-swl-acc=\"wrapper\"><summary class=\"swell-block-accordion__title\" data-swl-acc=\"header\"><span class=\"swell-block-accordion__label\"><strong><strong>Script Overview<\/strong><\/strong><\/span><span class=\"swell-block-accordion__icon c-switchIconBtn\" data-swl-acc=\"icon\" aria-hidden=\"true\" data-opened=\"false\"><i class=\"__icon--closed icon-caret-down\"><\/i><i class=\"__icon--opened icon-caret-up\"><\/i><\/span><\/summary><div class=\"swell-block-accordion__body\" data-swl-acc=\"body\">\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\"><strong>Getting the Sheet<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>function exportCalendarEvents() {\n  const sheetName = \"Schedule List\"; \/\/ Name of the sheet to output data\n  const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);\n\n  \/\/ Error check: Sheet existence\n  if (!sheet) {\n    Logger.log(`Error: The sheet \"${sheetName}\" was not found. Please create the sheet in your spreadsheet.`);\n    return;\n  }<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">exportCalendarEvents<\/span><span style=\"color: #F8F8F2\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> sheetName <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E6DB74\">&quot;Schedule List&quot;<\/span><span style=\"color: #F8F8F2\">; <\/span><span style=\"color: #88846F\">\/\/ Name of the sheet to output data<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> sheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getActiveSpreadsheet<\/span><span style=\"color: #F8F8F2\">().<\/span><span style=\"color: #A6E22E\">getSheetByName<\/span><span style=\"color: #F8F8F2\">(sheetName);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Error check: Sheet existence<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">sheet) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">`Error: The sheet &quot;<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">sheetName<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">&quot; was not found. Please create the sheet in your spreadsheet.`<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The variable <code>sheetName<\/code> is set to the name of the output sheet (in this case, \u201cSchedule List\u201d).<\/li>\n\n\n\n<li>If the sheet does not exist, an error message will be logged and the script will stop.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Retrieving Start Date, End Date, and Calendar IDs<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>  \/\/ Get start and end dates\n  const startDate = new Date(sheet.getRange(\"B2\").getValue());\n  const endDate = new Date(sheet.getRange(\"B3\").getValue());\n\n  \/\/ Get calendar IDs from B1 to the right\n  const calendarIds = sheet.getRange(\"B1:1\").getValues()&#91;0&#93;.filter(id => id);\n\n  if (calendarIds.length === 0) {\n    Logger.log(\"Error: No calendar IDs entered. Please enter at least one calendar ID starting from cell B1.\");\n    return;\n  }<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Get start and end dates<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> startDate <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">new<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">Date<\/span><span style=\"color: #F8F8F2\">(sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;B2&quot;<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValue<\/span><span style=\"color: #F8F8F2\">());<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> endDate <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">new<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">Date<\/span><span style=\"color: #F8F8F2\">(sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;B3&quot;<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValue<\/span><span style=\"color: #F8F8F2\">());<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Get calendar IDs from B1 to the right<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> calendarIds <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;B1:1&quot;<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValues<\/span><span style=\"color: #F8F8F2\">()&#91;<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">&#93;.<\/span><span style=\"color: #A6E22E\">filter<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">id<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF; font-style: italic\">=&gt;<\/span><span style=\"color: #F8F8F2\"> id);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (calendarIds.length <\/span><span style=\"color: #F92672\">===<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Error: No calendar IDs entered. Please enter at least one calendar ID starting from cell B1.&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script gets the start date from cell B2 and the end date from cell B3 to specify the date range.<\/li>\n\n\n\n<li>It then retrieves the calendar IDs entered from cell B1 to the right.<\/li>\n\n\n\n<li>If no calendar IDs are entered, an error message is logged and the script stops.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Clearing Data and Setting Headers<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>  \/\/ Clear output area (rows 5 and below)\n  const lastRow = sheet.getLastRow();\n  if (lastRow >= 5) {\n    sheet.getRange(\"5:\" + lastRow).clear(); \/\/ Clear only from row 5 onward\n  }\n\n  \/\/ Add header in row 5\n  const headerRange = sheet.getRange(5, 1, 1, 9);\n  headerRange.setValues([&#91;\n    \"Calendar ID\",\n    \"Title\",\n    \"Description\",\n    \"Start Date\",\n    \"Start Time\",\n    \"End Date\",\n    \"End Time\",\n    \"Location\",\n    \"Guests\"\n  &#93;]);\n\n  \/\/ Center header text and set background color (Light Green 3)\n  headerRange.setHorizontalAlignment(\"center\");\n  headerRange.setBackground(\"#b7e1cd\");<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Clear output area (rows 5 and below)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> lastRow <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getLastRow<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (lastRow <\/span><span style=\"color: #F92672\">&gt;=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">5<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;5:&quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> lastRow).<\/span><span style=\"color: #A6E22E\">clear<\/span><span style=\"color: #F8F8F2\">(); <\/span><span style=\"color: #88846F\">\/\/ Clear only from row 5 onward<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Add header in row 5<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> headerRange <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">5<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">9<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  headerRange.<\/span><span style=\"color: #A6E22E\">setValues<\/span><span style=\"color: #F8F8F2\">([&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Calendar ID&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Title&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Description&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Start Date&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Start Time&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;End Date&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;End Time&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Location&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #E6DB74\">&quot;Guests&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  &#93;]);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Center header text and set background color (Light Green 3)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  headerRange.<\/span><span style=\"color: #A6E22E\">setHorizontalAlignment<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;center&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  headerRange.<\/span><span style=\"color: #A6E22E\">setBackground<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;#b7e1cd&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All data from row 5 onward is cleared to remove the previous results.<\/li>\n\n\n\n<li>Headers are placed in row 5, and items such as Calendar ID are automatically added.<\/li>\n\n\n\n<li>The header row is center-aligned and the background color is set to \u201cLight Green 3.\u201d<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Day of the Week Conversion &amp; Preparing to Store Events<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>  \/\/ Function to get English day of week\n  function getDayOfWeek(date) {\n    const dayNames = &#91;\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"&#93;;\n    return dayNames&#91;date.getDay()&#93;;\n  }\n\n  let eventRows = [];<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Function to get English day of week<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">getDayOfWeek<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">date<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> dayNames <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> &#91;<\/span><span style=\"color: #E6DB74\">&quot;Sun&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Mon&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Tue&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Wed&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Thu&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Fri&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Sat&quot;<\/span><span style=\"color: #F8F8F2\">&#93;;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\"> dayNames&#91;date.<\/span><span style=\"color: #A6E22E\">getDay<\/span><span style=\"color: #F8F8F2\">()&#93;;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">let<\/span><span style=\"color: #F8F8F2\"> eventRows <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> [];<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <code>getDayOfWeek<\/code> function retrieves the Japanese day of the week corresponding to each date.<\/li>\n\n\n\n<li>An array called <code>eventRows<\/code> is created to store the event information.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Retrieving Schedules<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>  \/\/ Retrieve events for each calendar ID\n  calendarIds.forEach(calendarId => {\n    const calendar = CalendarApp.getCalendarById(calendarId);\n    if (!calendar) {\n      Logger.log(`Error: Calendar ID \"${calendarId}\" was not found.`);\n      return;\n    }\n\n    const events = calendar.getEvents(startDate, endDate);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Retrieve events for each calendar ID<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  calendarIds.<\/span><span style=\"color: #A6E22E\">forEach<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">calendarId<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF; font-style: italic\">=&gt;<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> calendar <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> CalendarApp.<\/span><span style=\"color: #A6E22E\">getCalendarById<\/span><span style=\"color: #F8F8F2\">(calendarId);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">calendar) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">`Error: Calendar ID &quot;<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">calendarId<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">&quot; was not found.`<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> events <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> calendar.<\/span><span style=\"color: #A6E22E\">getEvents<\/span><span style=\"color: #F8F8F2\">(startDate, endDate);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script retrieves each calendar ID from <code>calendarIds<\/code> one by one and converts it into a calendar object.<\/li>\n\n\n\n<li>If a calendar ID does not exist, an error is logged and that calendar is skipped.<\/li>\n\n\n\n<li>The script then retrieves all events that occur between the specified start and end dates.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Writing Schedules to the Sheet<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>      \/\/ Get guest emails, separated by commas\n      const guestList = event.getGuestList().map(guest => guest.getEmail()).join(\", \");\n\n      eventRows.push(&#91;\n        calendarId,\n        event.getTitle(),\n        event.getDescription(),\n        startDateFormatted,\n        Utilities.formatDate(startDateTime, Session.getScriptTimeZone(), \"HH:mm\"),\n        endDateFormatted,\n        Utilities.formatDate(endDateTime, Session.getScriptTimeZone(), \"HH:mm\"),\n        event.getLocation(),\n        guestList\n      &#93;);\n    });\n  });\n\n  \/\/ Output events from row 6 downward\n  if (eventRows.length > 0) {\n    sheet.getRange(6, 1, eventRows.length, 9).setValues(eventRows);\n  }\n\n  Logger.log(`A total of ${eventRows.length} events have been exported to the sheet \"${sheetName}\".`);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #88846F\">\/\/ Get guest emails, separated by commas<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      <\/span><span style=\"color: #66D9EF; font-style: italic\">const<\/span><span style=\"color: #F8F8F2\"> guestList <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> event.<\/span><span style=\"color: #A6E22E\">getGuestList<\/span><span style=\"color: #F8F8F2\">().<\/span><span style=\"color: #A6E22E\">map<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">guest<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF; font-style: italic\">=&gt;<\/span><span style=\"color: #F8F8F2\"> guest.<\/span><span style=\"color: #A6E22E\">getEmail<\/span><span style=\"color: #F8F8F2\">()).<\/span><span style=\"color: #A6E22E\">join<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;, &quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      eventRows.<\/span><span style=\"color: #A6E22E\">push<\/span><span style=\"color: #F8F8F2\">(&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        calendarId,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        event.<\/span><span style=\"color: #A6E22E\">getTitle<\/span><span style=\"color: #F8F8F2\">(),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        event.<\/span><span style=\"color: #A6E22E\">getDescription<\/span><span style=\"color: #F8F8F2\">(),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        startDateFormatted,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        Utilities.<\/span><span style=\"color: #A6E22E\">formatDate<\/span><span style=\"color: #F8F8F2\">(startDateTime, Session.<\/span><span style=\"color: #A6E22E\">getScriptTimeZone<\/span><span style=\"color: #F8F8F2\">(), <\/span><span style=\"color: #E6DB74\">&quot;HH:mm&quot;<\/span><span style=\"color: #F8F8F2\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        endDateFormatted,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        Utilities.<\/span><span style=\"color: #A6E22E\">formatDate<\/span><span style=\"color: #F8F8F2\">(endDateTime, Session.<\/span><span style=\"color: #A6E22E\">getScriptTimeZone<\/span><span style=\"color: #F8F8F2\">(), <\/span><span style=\"color: #E6DB74\">&quot;HH:mm&quot;<\/span><span style=\"color: #F8F8F2\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        event.<\/span><span style=\"color: #A6E22E\">getLocation<\/span><span style=\"color: #F8F8F2\">(),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        guestList<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">      &#93;);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    });<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  });<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Output events from row 6 downward<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (eventRows.length <\/span><span style=\"color: #F92672\">&gt;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">6<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">, eventRows.length, <\/span><span style=\"color: #AE81FF\">9<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">setValues<\/span><span style=\"color: #F8F8F2\">(eventRows);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">`A total of <\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">eventRows.length<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\"> events have been exported to the sheet &quot;<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">sheetName<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">&quot;.`<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script formats the start and end dates to include the Japanese day of the week, improving readability.<\/li>\n\n\n\n<li>Guest information (the invited email addresses) is retrieved, separated by commas, and combined into a single field.<\/li>\n\n\n\n<li>The event information is then added to the <code>eventRows<\/code> array.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Outputting the Data<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>  \/\/ Output events from row 6 downward\n  if (eventRows.length > 0) {\n    sheet.getRange(6, 1, eventRows.length, 9).setValues(eventRows);\n  }\n\n  Logger.log(`A total of ${eventRows.length} events have been exported to the sheet \"${sheetName}\".`);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #88846F\">\/\/ Output events from row 6 downward<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (eventRows.length <\/span><span style=\"color: #F92672\">&gt;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">6<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">, eventRows.length, <\/span><span style=\"color: #AE81FF\">9<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">setValues<\/span><span style=\"color: #F8F8F2\">(eventRows);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">`A total of <\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">eventRows.length<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\"> events have been exported to the sheet &quot;<\/span><span style=\"color: #F92672\">${<\/span><span style=\"color: #F8F8F2\">sheetName<\/span><span style=\"color: #F92672\">}<\/span><span style=\"color: #E6DB74\">&quot;.`<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The event information is written in bulk starting from row 6.<\/li>\n\n\n\n<li>If there is no data, nothing will be output.<\/li>\n\n\n\n<li>The number of exported events is recorded in the log, making it easy to check the results of the script.<\/li>\n<\/ul>\n<\/dd>\n<\/dl>\n<\/div><\/details>\n<\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>Saving the Script<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-256-1024x389.png\" alt=\"\" class=\"wp-image-22523\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-256-1024x389.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-256-300x114.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-256-768x292.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-256.png 1336w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>After writing the script, give it a name and save it.<\/p>\n\n\n\n<p>(For example: \u201cSchedule List\u201d)<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>Running the Script<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image is-style-shadow u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-258-1024x389.png\" alt=\"\" class=\"wp-image-22525\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-258-1024x389.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-258-300x114.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-258-768x292.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-258.png 1336w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-40\">When you run the script, it will retrieve the schedules for each calendar ID.<\/p>\n\n\n\n<div class=\"wp-block-group is-style-big_icon_memo u-mb-ctrl u-mb-60\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>If you&#8217;re running the script for the first time, you need to authorize it.<\/p>\n\n\n\n<p><strong>Therefore, press &#8220;<strong>Review Permissions.<\/strong>&#8220;<\/strong><\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-50\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"882\" height=\"345\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79.png\" alt=\"\" class=\"wp-image-15938\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79.png 882w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79-300x117.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79-768x300.png 768w\" sizes=\"(max-width: 882px) 100vw, 882px\" \/><\/figure>\n<\/div>\n\n\n<div class=\"swell-block-accordion\">\n<details class=\"swell-block-accordion__item\" data-swl-acc=\"wrapper\"><summary class=\"swell-block-accordion__title\" data-swl-acc=\"header\"><span class=\"swell-block-accordion__label\">Detailed Authorization Steps<\/span><span class=\"swell-block-accordion__icon c-switchIconBtn\" data-swl-acc=\"icon\" aria-hidden=\"true\" data-opened=\"false\"><i class=\"__icon--closed icon-caret-down\"><\/i><i class=\"__icon--opened icon-caret-up\"><\/i><\/span><\/summary><div class=\"swell-block-accordion__body\" data-swl-acc=\"body\">\n<p><strong>Press &#8220;Advanced.&#8221;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full u-mb-ctrl u-mb-50\"><img decoding=\"async\" width=\"1272\" height=\"688\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d.jpg\" alt=\"\" class=\"wp-image-15939\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d.jpg 1272w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-300x162.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-1024x554.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-768x415.jpg 768w\" sizes=\"(max-width: 1272px) 100vw, 1272px\" \/><\/figure>\n\n\n\n\n\n\n\n<p><strong>Press &#8220;Go to Untitled project (Unsafe).&#8221;<\/strong><\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-50\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"1305\" height=\"893\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9.jpg\" alt=\"\" class=\"wp-image-15940\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9.jpg 1305w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-300x205.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-1024x701.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-768x526.jpg 768w\" sizes=\"(max-width: 1305px) 100vw, 1305px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>After that, press &#8220;Allow.&#8221;<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"955\" height=\"543\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049.jpg\" alt=\"\" class=\"wp-image-15941\" style=\"width:566px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049.jpg 955w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049-300x171.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049-768x437.jpg 768w\" sizes=\"(max-width: 955px) 100vw, 955px\" \/><\/figure>\n<\/div>\n\n\n\n<\/div><\/details>\n<\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>The Schedules From Each Calendar Are Reflected in the Spreadsheet<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40 is-style-shadow\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"295\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-254-1024x295.png\" alt=\"\" class=\"wp-image-22521\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-254-1024x295.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-254-300x86.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-254-768x221.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-254-1536x442.png 1536w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/image-254.png 1772w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Schedules are displayed in date order for each calendar ID.<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-40\"><strong>Advanced: Finding Common Free Time Slots<\/strong><\/h2>\n\n\n\n<p>With Google Apps Script, you can not only view a list of schedules but also find available time slots for multiple people.<\/p>\n\n\n\n<p>By combining this script with another that outputs free time slots to a separate sheet, you can easily find potential meeting times.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">For more details on how to find common free time slots, please refer to this article.<\/p>\n\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-60\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7c73be541a256782f44e27e6dbbcd3cc-300x158.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/84office.jp\/google-calendar-free-time-extraction\/\">Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u7a7a\u304d\u6642\u9593\u3092\u62bd\u51fa\u3059\u308b\u65b9\u6cd5\uff5cGAS\u3067\u8907\u6570\u4eba\u306e\u5171\u901a\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u7ba1\u7406<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u30c1\u30fc\u30e0\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u8abf\u6574\u3059\u308b\u969b\u3001\u5168\u54e1\u306e\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u958b\u3044\u3066\u7a7a\u304d\u6642\u9593\u3092\u63a2\u3059\u306e\u306b\u624b\u9593\u304c\u304b\u304b\u308b\u3053\u3068\u3042\u308a\u307e\u305b\u3093\u304b\uff1f Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u306f\u8907\u6570\u306e\u4e88\u5b9a\u3092\u78ba\u8a8d\u3067\u304d\u308b\u6a5f\u80fd\u304c\u3042&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-40\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>By using this Google Apps Sscript solution, you can collect and manage schedules from multiple Google Calendars in a single Google Spreadsheet.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">Since you can organize schedules for multiple people, it greatly streamlines schedule coordination and task management.<\/p>\n\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-40\">\t\t\t<div class=\"p-blogCard -external\" data-type=\"type3\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u5408\u540c\u4f1a\u793e\u6a4b\u722a\u30aa\u30d5\u30a3\u30b9<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/04\/a737cf1e35e9b3ddb155beb5e38b9644-1.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/84office.jp\/google-calendar-to-sheet-template\/\" target=\"_blank\" rel=\"noopener noreferrer\">Google\u30ab\u30ec\u30f3\u30c0\u30fc\u4e88\u5b9a\u4e00\u89a7\u51fa\u529b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff5c\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u00d7GAS | \u5408\u540c\u4f1a\u793e\u6a4b\u722a\u30aa\u30d5\u30a3\u30b9<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u672c\u8a18\u4e8b\u3067\u3054\u7d39\u4ecb\u3059\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306f\u6709\u6599\u3067\u3059\u3002 \u4ee5\u524d\u306e\u8a18\u4e8b\u300eGoogle\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u51fa\u3057\uff5cGAS\u3067\u8907\u6570\u4eba\u306e\u4e88\u5b9a\u3082\u4e00\u62ec\u53d6\u5f97\uff01\u300f\u3067\u306f\u3001GAS\u3092\u4f7f&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-60\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/10\/34113e553ea369fe8a76c0045a79bbfe-300x158.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/84office.jp\/googlesheets-calendar-linkage\/\">\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u4e88\u5b9a\u3092Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u307e\u3068\u3081\u3066\u767b\u9332\u3059\u308b\u65b9\u6cd5\uff5cGAS\u3067\u52b9\u7387\u5316\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u4e88\u5b9a\u3084\u30bf\u30b9\u30af\u3092\u7ba1\u7406\u3059\u308b\u306e\u306b\u4fbf\u5229\u306aGoogle\u30ab\u30ec\u30f3\u30c0\u30fc\u3002 \u3067\u3059\u304c\u3001\u4e88\u5b9a\u304c\u591a\u6570\u3042\u308b\u5834\u5408\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u4e00\u3064\u4e00\u3064\u767b\u9332\u3059\u308b\u3068\u306a\u308b\u3068\u624b\u9593\u304c\u304b\u304b\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002 \u305d\u3093\u306a\u6642&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"is-style-emboss_box has-swl-pale-02-background-color has-background\">Our company offers support for improving work efficiency through the use of Google Apps Script. <br>If you need assistance with Google Apps Script customization or error resolution, please feel free to contact us. <br>We are fully committed to supporting your business improvements.<br><br><a href=\"https:\/\/84office.jp\/contact\/\">Contact us here<br><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Calendar is an incredibly useful tool that allows you to view multiple people\u2019s schedules all in one pl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":22527,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","_locale":"en_US","_original_post":"https:\/\/84office.jp\/?p=15527","footnotes":""},"categories":[12],"tags":[],"class_list":["post-22503","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12","en-US"],"_links":{"self":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/22503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/comments?post=22503"}],"version-history":[{"count":6,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/22503\/revisions"}],"predecessor-version":[{"id":22561,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/22503\/revisions\/22561"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media\/22527"}],"wp:attachment":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media?parent=22503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/categories?post=22503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/tags?post=22503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}