Created
July 21, 2021 15:48
-
-
Save WakkyFree/a7eaa87025b5ebf27b34bb3dd3049050 to your computer and use it in GitHub Desktop.
google apps script to read spreadsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function readSheet(){ | |
var data = openSheet().getDataRange().getValues(); | |
return data; | |
} | |
function doGet() { | |
const htmlOutput = HtmlService.createTemplateFromFile('ss_open_test').evaluate(); | |
htmlOutput.setTitle("スプレッドシート読み込みテスト"); | |
return htmlOutput; | |
} | |
function openSheet() { | |
var id = "1lDnkZwZxwB0DCN5FtKQJvE44y-LIu9_vsviz9Yn-j7s"; | |
var ss = SpreadsheetApp.openById(id).getSheetByName("messages"); | |
return ss; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment