2021年3月29日 星期一

Google APP Script

可將 Google Spreadsheet 作為 SQL 使用

https://github.com/agershun/alasql

Google Sheets SUPERSQL QUERY Function - Apps Script SQL AlaSQL UDF - Part 1

https://www.youtube.com/watch?v=0KuSD5PGQF8&t=1304s

可用 Local 開發版控

https://github.com/google/clasp

利用 APP Script 建立 HTML 網頁:

// html string

function doGet(e) {

  var param = e.parameter;

  var sheet = SpreadsheetApp.getActiveSheet();

  sheet.getRange(sheet.getLastRow() + 1,1).setValue([param.name]);

  return HtmlService.createHtmlOutput('<b>Hello, world!</b>');

}

// html file

function doGet() {

  return HtmlService.createHtmlOutputFromFile('index.html')

}