LoginSignup
11
13

More than 5 years have passed since last update.

Google Apps Scriptを書いて思ったことメモ

Posted at

Google Apps Scriptでちょっと長めのスクリプトを書いてみて思ったことメモです。

言語仕様みたいな解説がない

情報が豊富なリファレンスサイトがあるんだけど、スプレッドシート操作の内容が多い。

Google Apps Script入門
http://google-appsscript.blogspot.jp/

逆引きGoogle Apps Script
http://www.bmoo.net/archives/google-apps-script-refference

英語の公式ドキュメントもある。

公式ドキュメントのチュートリアル
https://developers.google.com/apps-script/articles

スプレッドシート操作以外の、基本的なスクリプト作成方法では、こちらのサイトが一番役に立った。
http://engineer-intern.jp/archives/category/column/start/googleappsscript
詳しく書かれてるわけじゃないんだけど、言語の雰囲気みたいなのがわかる。

メモ

undefined判定

if (bl !== undefined)

文字列の加算は+を使う

str = str1 + str2

文字列の空判定

if (str != "")

exit

exitさせたいときは例外を投げる

throw new Error("メッセージ")

行末

行末は「;」省略可

11
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
13