Skip to content

Instantly share code, notes, and snippets.

@WakkyFree
Last active July 21, 2021 15:46
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 WakkyFree/ade39120f16ccd1135f3a09dea5573cf to your computer and use it in GitHub Desktop.
Save WakkyFree/ade39120f16ccd1135f3a09dea5573cf to your computer and use it in GitHub Desktop.
google apps script to write spreadsheet
function writeSheet(e) {
var ss = openSheet();
ss.appendRow([e]);
}
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