Google Action Script 介紹

透過程式碼寄送Email

function myFunction() {
   var now = new Date();
  
  GmailApp.sendEmail("justgps@gmail.com", "current time", "The time is: " + now.toString());
}

SpreadSeet 

function testSheet() {
  var sh = SpreadsheetApp.openById("0009ii4vb35B456nJoeK4hvl0nOS-uEPuvQ8Vn-8");
  var sheet = sh.getSheetByName("people");   // sheet.getName()  取得名稱
  
  sheet.appendRow(['1', '劉智漢', '27899963', 'email@email.com', 'picture', '1', '1', '1', '1']);
  
  Logger.log(sh.getName());  // 取得spreadSheet名稱  sh.getNumSheets()  // 取得編號
}