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
var SCRIPT_PROP = PropertiesService.getScriptProperties(); | |
function setup() { | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
SCRIPT_PROP.setProperty("//ใส ID ของชีต", doc.getId()); | |
} | |
function doGet(e) { | |
return HtmlService.createHtmlOutputFromFile('form.html').setTitle("ฟอร์มรับสมัครนักเรียน"); | |
} |
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 checkQuotaEmail () { | |
var emailQuota = MailApp.getRemainingDailyQuota(); | |
Logger.log("โควต้าอีเมลคงเหลือ:" + emailQuota); | |
MailApp.sendEmail("ใส่อีเมลของท่าน", | |
"แจ้งโควต้าการส่งอีเมล", | |
"สิทธิ์ในการส่งอีเมลของคุณวันนี้เหลือเท่ากับจำนวน "+emailQuota +" ฉบับ"); | |
} |
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
/* สร้างเมนู pdf ใน Google Sheet */ | |
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('PDF') | |
.addItem('สร้างไฟล์ PDF','run_pdf') | |
.addToUi(); | |
} | |
function run_pdf() { | |
runPDFs(); | |
} |
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 doGet(e){ | |
var op = e.parameter.action; | |
var ss=SpreadsheetApp.openByUrl("ใส่ url ชีต"); | |
var sheet = ss.getSheetByName("ใส่ชื่อแผ่นงาน"); | |
if(op=="insert") | |
return insert_value(e,sheet); | |
if(op=="read") |
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 doGet(e){ | |
var op = e.parameter.action; | |
var ss=SpreadsheetApp.openByUrl("ใส่ url ชีต"); | |
var sheet = ss.getSheetByName("ใส่ชื่อแผ่นงาน"); | |
if(op=="insert") | |
return insert_value(e,sheet); | |
if(op=="read") |
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
<html> | |
<head> | |
<style> | |
table, th, td | |
{ | |
margin:10px 0; | |
border:solid 1px #333; | |
padding:2px 4px; | |
font:15px Verdana; | |
} |
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 include(filename) { | |
return HtmlService.createHtmlOutputFromFile(filename).getContent(); | |
} | |
function render(file, argsObject){ | |
var tmp = HtmlService.createTemplateFromFile(file); | |
if(argsObject) { | |
var keys = Object.keys (argsObject); | |
keys.forEach(function(key){ | |
tmp[key] = argsObject[key]; | |
}); |
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 doGet(e){ | |
var op = e.parameter.action; | |
var ss=SpreadsheetApp.openByUrl("ใส่ url ของชีต");////////////// | |
var sheet = ss.getSheetByName("แผ่น1"); | |
if(op=="insert") | |
return insert_value(e,sheet); | |
if(op=="read") |
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 doPost(e) { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheetByName("เมนู"); | |
var data = JSON.parse(e.postData.contents) | |
var userMsg = data.originalDetectIntentRequest.payload.data.message.text; | |
var values = sheet.getDataRange().getValues(); | |
var info = values.find(function seek(row) { |
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
var ss = SpreadsheetApp.openByUrl("ชีต URL"); | |
var sheet = ss.getSheetByName("ชื่อชีต"); | |
function doGet(e){ | |
var action = e.parameter.action; | |
if(action == "in") | |
return inTime(e); | |
if(action == "out") | |
return outTime(e); |
OlderNewer