LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

Saturday, January 12, 2019

Googel Apps Scriptで作るアドオンについて


スプレッドシートにアドオンを追加する際に調べたことを書き残していきます。

(公式のリファレンスから原文を引用していますが、日本語は個人的な意訳です)



まずは、Extending G Suite with Add-ons から要点だけ抜き出します。


1. スプレッドシートやドキュメントに追加するアドオンはエディタアドオンと呼ばれます
Add-ons that extend Google Sheets, Docs, Slides or Forms are called editor add-ons, since they operate within one of the Google Drive editor applications.

2. アドオンはスタンドアロンスクリプトで作成します
You build your editor add-on in a standalone Apps Script project.

3. アドオンのUIはガイドラインに沿って作成します
Your add-on can present your brand to your users, but you should adhere to the Add-on UI guidelines for branding. Here is some additional information on how you can present your add-on.

4. HTMLサービスを使う場合はCSSパッケージを使用します
When you're using the HTML service to build your add-on interface, use our CSS package to make your add-on styling consistent with the G Suite editors.

5. 公開する場合はガイドラインに沿うようにしてレビューを経る必要があります
Note that public add-ons undergo a review process to ensure they meet our content and style guidelines.


次に、Publication categories から要点を抜き出します


6. エディタアドオンを公開するとChromeウェブストアかG Suiteマーケットプレースまたは両方に表示されます
If published publicly, an add-on appears in the Chrome Web Store or G Suite Marketplace or both, for anyone to find and install.

7. アドオンは限定公開の設定もできます
When configuring your add-on for publication, you must choose to publish it as either a private or public add-on.

8. プライベートアドオンまたはパブリックアドオンとして公開できますが、公開後に変更することはできません
Once you choose a visibility option and save the publishing configuration, you can't change your selection later. 

9. プライベートアドオンは、アドオン発行アカウントと同じドメイン内のユーザーにのみ表示され、レビューを必要としません
Private add-ons are only visible to users in the same domain as the add-on publishing account. 
Private add-ons do not require add-on review.

10. パブリックアドオンはアドオンレビューを通過すれば世界的に公開できます
Public add-ons are visible globally in the G Suite Marketplace. 
Public add-ons must go through the add-on review process before they are published.


次に Add-on authorization から要点を抜き出します


11. エディタアドオンを使用すると、そのドキュメントに限って共同編集者にもそのアドオンが表示されます
Collaborators on those documents won't see the add-on except in documents where you actually use it.


Publishing an editor add-on からも要点を抜き出します

12. GmailアドオンはG Suite Marketplaceにのみ公開されます
Gmail add-ons are only published to G Suite Marketplace and do not appear in the Chrome Web Store.

13. ライブラリを使いすぎると処理が遅くなります
The script should not use libraries excessively, because libraries can cause the add-on to lose performance.


CSS package for editor add-ons

14. CSS packageを使う場合はHTMLファイルの先頭に以下のコードを追加します
To help your editor add-on look and feel like Google Sheets, Docs, or Forms, link in the CSS package below to apply Google styling to fonts, buttons, and form elements. For a sample of the CSS package in use, see the Docs add-on quickstart. To use the CSS package, just include the following at the top of each HTML file:
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">



Latest post

Extracting data from Google Sheets with regular expressions

Introduction Regular expressions are a powerful tool that can be used to extract data from text.  In Google Sheets, regular expressions ca...