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 htmlOutput = HtmlService.createTemplateFromFile('index'); | |
htmlOutput.message = ''; | |
return htmlOutput.evaluate(); | |
} | |
function doPost(e) { | |
var folder = DriveApp.getFolderById('xxx');//เปลี่ยนเป็นไอดีโฟลเดอร์เก็บไฟล์ของท่าน; | |
var data = Utilities.base64Decode(e.parameter.fileData); | |
var blob = Utilities.newBlob(data, e.parameter.mimeType, e.parameter.fileName); |
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() { | |
return HtmlService.createTemplateFromFile('index').evaluate() | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) | |
} | |
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(); | |
var sheetID= 'xxx' | |
function setup() { | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
SCRIPT_PROP.setProperty(sheetID, doc.getId()); | |
} | |
function uploadFile(data, file,id,stdCode,firstname,lastname,address,tel,email) { | |
try { | |
var folder=DriveApp.getFolderById('xxx'); |
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() { | |
return HtmlService.createTemplateFromFile('index').evaluate(); | |
} | |
function processForm(formObject){ | |
var result = ""; | |
if(formObject.searchtext){ | |
result = search(formObject.searchtext); | |
} | |
return result; |
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 template = HtmlService.createTemplateFromFile('index') | |
return template.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME) | |
.addMetaTag('viewport', 'width=device-width , initial-scale=1') | |
} | |
function setPlainText() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets = ss.getSheets(); | |
for(var i = 0; i < sheets.length; i++) { |
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) { | |
return HtmlService.createTemplateFromFile("index").evaluate() | |
.setTitle("ระบบ Login") | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); | |
} | |
function processForm(formObject){ | |
var concat = formObject.searchtext+formObject.searchtext2; | |
var result = ""; |
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.openById('xxx') | |
var sheet = ss.getSheetByName('xxx') | |
function doGet(e) { | |
var action = e.parameter.action | |
if (action == 'getUsers') { | |
return getUsers(e) | |
} | |
} |
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 myFunction() { | |
var calenda = CalendarApp.getCalendarById("xxx"); | |
var token = "xxx"; // Line Token | |
var url = "https://notify-api.line.me/api/notify"; | |
var today = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()); | |
var event = calenda.getEventsForDay(today); | |
var msg = ""; | |
if (event.length === 0) { | |
msg = "วันนี้ไม่มีกิจกรรม"; |
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 WEB_URL = "xxx"; | |
function doPost(e) { | |
return redirect(); | |
} | |
function doGet() { | |
var template = HtmlService.createTemplateFromFile("login"); | |
template.url = ScriptApp.getService().getUrl(); | |
return template.evaluate(); |
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 template = HtmlService.createTemplateFromFile('xxx') | |
return template.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME) | |
.addMetaTag('viewport', 'width=device-width , initial-scale=1') | |
} | |
function getCode(code) { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var allss =ss.getSheets(); |