Skip to content

Instantly share code, notes, and snippets.

@jschang19
Created August 15, 2021 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jschang19/b5fe840e5109830bc418820dfa2b99a2 to your computer and use it in GitHub Desktop.
Save jschang19/b5fe840e5109830bc418820dfa2b99a2 to your computer and use it in GitHub Desktop.
Google App Script 讀取、編輯 Google 試算表的語法。
/* Created by Chun Shawn in jcshawn.com
* Google App Script 讀取、編輯 Google 試算表的語法,此為利用網址讀取的方法。
*/
const sheet_url = 'https://docs.google.com/spreadsheets/d/******'; // 將引號處的內容改成你的 Google 試算表連結
// 工作表名稱
const sheet_name = 'reserve'; // 將 reserve 改成你的工作表名稱
const SpreadSheet = SpreadsheetApp.openByUrl(sheet_url);
const reserve_list = SpreadSheet.getSheetByName(sheet_name); // 可以將 reserve_list 變數名稱改掉
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment