LANG SELRCT

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

Monday, December 4, 2017

ユーザのGmailアドレスを取得する

公式リファレンスの内容そのままですが
これで現在スクリプトを実行しているユーザのGmailアドレスを取得できます


コード.gs
function myFunction(){
 var email = Session.getActiveUser().getEmail();
 Logger.log(email);
}
意訳.gs
この処理は以下を実行する
このスクリプトを実行しているユーザのGmailアドレスを取得して
ログに出す



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...