# Google Apps Script

{% tabs %}
{% tab title="🔴 主題" %}

* [google-sheet](https://lochiwei.gitbook.io/web/appendix/gas/google-sheet "mention")
* [app](https://lochiwei.gitbook.io/web/appendix/gas/app "mention")
* [gas-commands](https://lochiwei.gitbook.io/web/appendix/gas/gas-commands "mention")
  {% endtab %}

{% tab title="⭐️ 重點" %}
{% hint style="info" %}
a script that is bound to a [google-sheet](https://lochiwei.gitbook.io/web/appendix/gas/google-sheet "mention") is called a <mark style="color:purple;">**container-bound**</mark> script.
{% endhint %}

{% hint style="danger" %}
專有 classes (如：[Sheet](https://developers.google.com/apps-script/reference/spreadsheet/sheet?hl=en), [Range](https://developers.google.com/apps-script/reference/spreadsheet/range?hl=en) ...) 沒有專屬的 [prototype](https://lochiwei.gitbook.io/web/js/val/func/prototype "mention")❗️

👉 參閱：&#x20;

* [prototype](https://lochiwei.gitbook.io/web/js/val/func/prototype "mention") 「❓」頁面
* custom [prototypes](https://lochiwei.gitbook.io/web/appendix/gas/app/prototypes "mention") for [gas](https://lochiwei.gitbook.io/web/appendix/gas "mention")
  {% endhint %}
  {% endtab %}

{% tab title="📗 參考" %}

* [ ] [Announcing the Apps Script connector for AppSheet: Automate workflows for Google Workspace](https://developers.googleblog.com/2022/04/apps-script-connector-for-appsheet.html?linkId=8054167)
* [ ] Ben Collins ⟩&#x20;
  * [x] [Google Apps Script: A Beginner’s Guide](https://www.benlcollins.com/apps-script/google-apps-script-beginner-guide/)
  * [ ] [Introduction To Google Apps Script](https://courses.benlcollins.com/courses/enrolled/435404) (👨🏻‍🎓 課程 )
  * [ ] [API Tutorial For Beginners With Google Sheets & Apps Script](https://www.benlcollins.com/apps-script/api-tutorial-for-beginners/)
    {% endtab %}

{% tab title="📘 手冊" %}

* [Sheet](https://developers.google.com/apps-script/reference/spreadsheet/sheet?hl=en) ⟩
  * [getDataRange()](https://developers.google.com/apps-script/reference/spreadsheet/sheet?hl=en#getdatarange) - from <mark style="color:yellow;">**A1**</mark> to the last cell with value.
  * [getLastRow()](https://developers.google.com/apps-script/reference/spreadsheet/sheet?hl=en#getlastrow) - index of the last row that <mark style="color:yellow;">**has content**</mark>.
* [Range](https://developers.google.com/apps-script/reference/spreadsheet/range?hl=en) ⟩
* [Dialogs and Sidebars](https://developers.google.com/apps-script/guides/dialogs)
* Guides ⟩&#x20;
  * [Libraries](https://developers.google.com/apps-script/guides/libraries) - script project whose functions can be reused in other scripts.
  * [Extending Google Sheet](https://developers.google.com/apps-script/guides/sheets)
  * [V8 Runtime](https://developers.google.com/apps-script/guides/v8-runtime)
    {% endtab %}

{% tab title="🖥️ 影片" %}

* [David Weiss](https://www.youtube.com/c/DavidWeissProgramming) ⟩ Apps Script ⟩
  * [ ] [Spreadsheet Service](https://www.youtube.com/playlist?list=PL42xwJRIG3xBZFP5wYh-OFb-CQmjz-Rn-)
  * [ ] [Maps Service](https://www.youtube.com/playlist?list=PL42xwJRIG3xAXgY2FksYt-kbKuXNmSUMA)
    {% endtab %}

{% tab title="💎 資源" %}

* [Sheet Playground](https://docs.google.com/spreadsheets/d/1w503eXY3odE3-EbNse0E2nDbmOW17wzB8CDyFVpXwLM/edit#gid=0)
* [Google 雲端範本區](https://docs.google.com/spreadsheets/u/1/?ftv=1)
  {% endtab %}

{% tab title="👥 相關" %}

* 目前不支援 [field](https://lochiwei.gitbook.io/web/js/val/class/member/field "mention")，但可用 ([static](https://lochiwei.gitbook.io/web/js/val/class/member/static)/instance) [getter-setter](https://lochiwei.gitbook.io/web/js/val/class/member/getter-setter "mention") 代替。
  {% endtab %}
  {% endtabs %}
