<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GAS | You Look Too Cool</title>
	<atom:link href="https://stabucky.com/wp/archives/tag/gas/feed" rel="self" type="application/rss+xml" />
	<link>https://stabucky.com/wp</link>
	<description>ゆるくつくる stabuckyのブログ</description>
	<lastBuildDate>Sun, 30 Mar 2025 05:10:39 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://stabucky.com/wp/wp-content/uploads/2024/05/cropped-stabucky-32x32.png</url>
	<title>GAS | You Look Too Cool</title>
	<link>https://stabucky.com/wp</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>GASでユーザー定義関数を作り使い回す方法</title>
		<link>https://stabucky.com/wp/archives/14115</link>
					<comments>https://stabucky.com/wp/archives/14115#respond</comments>
		
		<dc:creator><![CDATA[stabucky]]></dc:creator>
		<pubDate>Fri, 14 May 2021 03:52:08 +0000</pubDate>
				<category><![CDATA[デジタル]]></category>
		<category><![CDATA[GAS]]></category>
		<guid isPermaLink="false">https://stabucky.com/wp/?p=14115</guid>

					<description><![CDATA[Googleのスプレッドシートでユーザー定義関数を使うことができます。 その使い方と作ったユーザー定義関数を別のスプレッドシートで使い回す方法を紹介します。 例として、税抜金額を渡すと税込金額を返す簡単な関数を使います。 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Googleのスプレッドシートでユーザー定義関数を使うことができます。<br />
その使い方と作ったユーザー定義関数を別のスプレッドシートで使い回す方法を紹介します。<br />
例として、税抜金額を渡すと税込金額を返す簡単な関数を使います。<span id="more-14115"></span></p>

  <div id="toc" class="toc tnt-number toc-center tnt-number border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-2" checked><label class="toc-title" for="toc-checkbox-2">目次</label>
    <div class="toc-content">
    <ol class="toc-list open"><li><a href="#toc1" tabindex="0">ユーザー定義関数を作る</a></li><li><a href="#toc2" tabindex="0">ユーザー定義関数を使い回す</a></li></ol>
    </div>
  </div>

<h2><span id="toc1">ユーザー定義関数を作る</span></h2>
<p>スプレッドシートを開き、メニューの ツール &#8211; スクリプトエディタ をクリックします。<br />
次のようになっています。</p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-14124" src="https://stabucky.com/wp/wp-content/uploads/2021/05/gas1.png" alt="" width="383" height="179" /></p>
<p>ここに次のように書きます。</p>
<div class="codecolorer-container javascript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #000066; font-weight: bold;">function</span> myFunction<span style="color: #009900;">&#40;</span>zeikomi<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">return</span> zeikomi <span style="color: #339933;">=</span> zeinuki <span style="color: #339933;">*</span> <span style="color: #CC0000;">1.1</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><img decoding="async" class="alignnone size-full wp-image-14125" src="https://stabucky.com/wp/wp-content/uploads/2021/05/gas2.png" alt="" width="383" height="179" /></p>
<p>スプレッドシートに戻り、任意のセルに「=myFunction(1000)」と入力します。<br />
「1100」と表示されます。税抜から税込が計算されました。</p>
<p><img decoding="async" class="alignnone size-full wp-image-14126" src="https://stabucky.com/wp/wp-content/uploads/2021/05/gas3.png" alt="" width="383" height="179" /></p>
<h2><span id="toc2">ユーザー定義関数を使い回す</span></h2>
<p>Googleドライブを開きます。<br />
<a href="https://drive.google.com/drive/my-drive">https://drive.google.com/drive/my-drive</a></p>
<p>新規 &#8211; その他 &#8211; Google Apps Script をクリックします。<br />
編集画面が開きます。<br />
名前をわかりやすい名前にします。ここでは「common_function」としました。<br />
コードを次のようにします。</p>
<div class="codecolorer-container javascript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #000066; font-weight: bold;">function</span> zeikomi<span style="color: #009900;">&#40;</span>zeinuki<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">return</span> zeinuki <span style="color: #339933;">*</span> <span style="color: #CC0000;">1.1</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>保存します。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-14127" src="https://stabucky.com/wp/wp-content/uploads/2021/05/gas4.png" alt="" width="396" height="258" /></p>
<p>左の歯車アイコンをクリックしてIDをコピーします。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-14128" src="https://stabucky.com/wp/wp-content/uploads/2021/05/gas5.png" alt="" width="697" height="371" srcset="https://stabucky.com/wp/wp-content/uploads/2021/05/gas5.png 697w, https://stabucky.com/wp/wp-content/uploads/2021/05/gas5-500x266.png 500w" sizes="(max-width: 697px) 100vw, 697px" /></p>
<p>このユーザー定義関数を使いたいスプレッドシートのスクリプトエディタを開きます。<br />
エディタ &#8211; ライブラリ &#8211; プラスアイコン をクリックします。<br />
スクリプトIDに先ほどコピーしたIDをペーストします。<br />
検索をクリックします。先ほど設定した名前「common_function」が表示されます。<br />
追加をクリックします。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-14129" src="https://stabucky.com/wp/wp-content/uploads/2021/05/gas6.png" alt="" width="498" height="479" /></p>
<p>コードを次のようにします。</p>
<div class="codecolorer-container javascript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #000066; font-weight: bold;">function</span> myFunction<span style="color: #009900;">&#40;</span>zeinuki<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">return</span> common_function.<span style="color: #660066;">zeikomi</span><span style="color: #009900;">&#40;</span>zeinuki<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>「common_function.関数名」とするのがポイントです。<br />
保存します。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-14130" src="https://stabucky.com/wp/wp-content/uploads/2021/05/gas7.png" alt="" width="401" height="156" /></p>
<p>これで先ほどと同様にスプレッドシート上でユーザー定義関数が使えるようになります。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stabucky.com/wp/archives/14115/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Googleカレンダーをスプレッドシートにエクスポートする方法</title>
		<link>https://stabucky.com/wp/archives/14000</link>
					<comments>https://stabucky.com/wp/archives/14000#respond</comments>
		
		<dc:creator><![CDATA[stabucky]]></dc:creator>
		<pubDate>Wed, 10 Mar 2021 03:49:51 +0000</pubDate>
				<category><![CDATA[デジタル]]></category>
		<category><![CDATA[GAS]]></category>
		<category><![CDATA[カレンダー]]></category>
		<category><![CDATA[スプレッドシート]]></category>
		<guid isPermaLink="false">https://stabucky.com/wp/?p=14000</guid>

					<description><![CDATA[Googleカレンダーはエクスポートすることができます。 右上の歯車アイコンをクリックして「設定」を選択。 左側の「マイカレンダーの設定」から目的のカレンダーをクリックして「カレンダーの設定」を選択。 右側の「カレンダー [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Googleカレンダーはエクスポートすることができます。</p>
<p>右上の歯車アイコンをクリックして「設定」を選択。<br />
左側の「マイカレンダーの設定」から目的のカレンダーをクリックして「カレンダーの設定」を選択。<br />
右側の「カレンダーをエクスポート」をクリック。</p>
<p>これでダウンロードできます。<br />
ファイル形式はiCalなので使いにくいかもしれません。</p>
<p>スプレッドシートに直接、エクスポートする方法を考えます。<br />
GASを使います。<span id="more-14000"></span></p>

  <div id="toc" class="toc tnt-number toc-center tnt-number border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-4" checked><label class="toc-title" for="toc-checkbox-4">目次</label>
    <div class="toc-content">
    <ol class="toc-list open"><li><a href="#toc1" tabindex="0">カレンダーIDの取得</a></li><li><a href="#toc2" tabindex="0">タイムゾーンの変更</a></li><li><a href="#toc3" tabindex="0">コード</a></li></ol>
    </div>
  </div>

<h2><span id="toc1">カレンダーIDの取得</span></h2>
<p>カレンダーIDを使うので取得しておきます。</p>
<p>右上の歯車アイコンをクリックして「設定」を選択。<br />
左側の「マイカレンダーの設定」から目的のカレンダーをクリックして「カレンダーの設定」を選択。<br />
右側の「カレンダーID」を確認。</p>
<h2><span id="toc2">タイムゾーンの変更</span></h2>
<p>タイムゾーンを日本に変更しておきます。</p>

<a href="https://stabucky.com/wp/archives/13825" title="GASのタイムゾーンを変更する方法" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://stabucky.com/wp/wp-content/uploads/2021/01/googleappsscript_logo-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://stabucky.com/wp/wp-content/uploads/2021/01/googleappsscript_logo-160x90.png 160w, https://stabucky.com/wp/wp-content/uploads/2021/01/googleappsscript_logo-120x68.png 120w, https://stabucky.com/wp/wp-content/uploads/2021/01/googleappsscript_logo-320x180.png 320w, https://stabucky.com/wp/wp-content/uploads/2021/01/googleappsscript_logo.png 400w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">GASのタイムゾーンを変更する方法</div><div class="blogcard-snippet internal-blogcard-snippet">Google Apps Scriptで次のようにして現在の日付を取得します。console.log(new Date())次の通り現在の日付が表示されます。Wed Jan 27 2021 19:30:11 GMT-0500 (Eastern...</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://stabucky.com/wp" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">stabucky.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2021.01.28</div></div></div></div></a>
<h2><span id="toc3">コード</span></h2>
<div class="codecolorer-container javascript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #000066; font-weight: bold;">function</span> getCalendarEvents<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; calendar_id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;xxxxx@group.calendar.google.com&quot;</span><span style="color: #339933;">;</span> <br />
&nbsp; calendar<span style="color: #339933;">=</span>CalendarApp.<span style="color: #660066;">getCalendarById</span><span style="color: #009900;">&#40;</span>calendar_id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; startTime<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">new</span> <span style="">Date</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2021</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; endTime<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">new</span> <span style="">Date</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2021</span><span style="color: #339933;">,</span><span style="color: #CC0000;">4</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; events<span style="color: #339933;">=</span>calendar.<span style="color: #660066;">getEvents</span><span style="color: #009900;">&#40;</span>startTime<span style="color: #339933;">,</span> endTime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>events.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">+=</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; st<span style="color: #339933;">=</span>events<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getStartTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; et<span style="color: #339933;">=</span>events<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getEndTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; t<span style="color: #339933;">=</span>events<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getTitle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; l<span style="color: #339933;">=</span>events<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getLocation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; sheet<span style="color: #339933;">=</span>SpreadsheetApp.<span style="color: #660066;">getActiveSheet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span>st<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span>et<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span>t<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span>l<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>取得できる情報、方法は下のページにあります。</p>

<a rel="noopener" href="https://developers.google.com/apps-script/reference/calendar/calendar-event" title="Class CalendarEvent  |  Apps Script  |  Google for Developers" class="blogcard-wrap external-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard external-blogcard eb-left cf"><div class="blogcard-label external-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail external-blogcard-thumbnail"><img loading="lazy" decoding="async" src="https://www.gstatic.com/devrel-devsite/prod/vd980a342b8e3e77c07209be506f8385246f583d6eec83ceb07569bbf26f054dc/developers/images/opengraph/white.png" alt="" class="blogcard-thumb-image external-blogcard-thumb-image" width="160" height="90" /></figure><div class="blogcard-content external-blogcard-content"><div class="blogcard-title external-blogcard-title">Class CalendarEvent  |  Apps Script  |  Google for Developers</div><div class="blogcard-snippet external-blogcard-snippet"></div></div><div class="blogcard-footer external-blogcard-footer cf"><div class="blogcard-site external-blogcard-site"><div class="blogcard-favicon external-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://developers.google.com/apps-script/reference/calendar/calendar-event" alt="" class="blogcard-favicon-image external-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain external-blogcard-domain">developers.google.com</div></div></div></div></a>
]]></content:encoded>
					
					<wfw:commentRss>https://stabucky.com/wp/archives/14000/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Googleスプレッドシートから連続でGmail送信する方法</title>
		<link>https://stabucky.com/wp/archives/13937</link>
					<comments>https://stabucky.com/wp/archives/13937#respond</comments>
		
		<dc:creator><![CDATA[stabucky]]></dc:creator>
		<pubDate>Tue, 16 Feb 2021 23:57:12 +0000</pubDate>
				<category><![CDATA[デジタル]]></category>
		<category><![CDATA[GAS]]></category>
		<category><![CDATA[Gmail]]></category>
		<guid isPermaLink="false">https://stabucky.com/wp/?p=13937</guid>

					<description><![CDATA[Googleスプレッドシートに宛先、件名、本文をセットしておき、まとめてメール送信する方法を紹介します。 GAS(Google Apps Script)を使います。 最低限の内容にしていますのでアレンジは容易だと思います [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Googleスプレッドシートに宛先、件名、本文をセットしておき、まとめてメール送信する方法を紹介します。<br />
GAS(Google Apps Script)を使います。<br />
最低限の内容にしていますのでアレンジは容易だと思います。<span id="more-13937"></span></p>
<p>送信が完了したものについては送信日時をセットして次回からは送信対象外とします。</p>
<div class="codecolorer-container javascript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;height:400px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #000066; font-weight: bold;">function</span> mailFromSheet<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #006600; font-style: italic;">// シートにセットされたとおりメール送信。</span><br />
&nbsp; <span style="color: #006600; font-style: italic;">// 送信後、送信日時をセット。送信日時がある行は実行しない。</span><br />
&nbsp; sheet <span style="color: #339933;">=</span> SpreadsheetApp.<span style="color: #660066;">getActiveSheet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;=</span> sheet.<span style="color: #660066;">getLastRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// 宛先 メールアドレス</span><br />
&nbsp; &nbsp; mailTo <span style="color: #339933;">=</span> sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// 件名</span><br />
&nbsp; &nbsp; mailSubject <span style="color: #339933;">=</span> sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// 本文 改行は「\n」を使う。</span><br />
&nbsp; &nbsp; mailBody <span style="color: #339933;">=</span> sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\\n/g</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; mailDatetime <span style="color: #339933;">=</span> sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> <span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>mailDatetime <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; MailApp.<span style="color: #660066;">sendEmail</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; to<span style="color: #339933;">:</span> mailTo<span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; subject<span style="color: #339933;">:</span> mailSubject<span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; body<span style="color: #339933;">:</span> mailBody<br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; myDatetime <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> <span style="">Date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; sheet.<span style="color: #660066;">getRange</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> <span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span>myDatetime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
					
					<wfw:commentRss>https://stabucky.com/wp/archives/13937/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
