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 FormSubmit(e) { | |
const info = e.namedValues | |
const pdfFile = createPDF(info) | |
const entryRow = e.range.getRow() | |
const ws = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('xxx')//1 | |
ws.getRange(entryRow, 6).setValue(pdfFile.getUrl()) | |
sendEmail(e.namedValues['xxx'], pdfFile)//2 | |
sendLine(info) | |
} |
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.createHtmlOutputFromFile('xxx'); | |
} | |
function uploadFiles(form) { | |
try { | |
var dropbox = "HomeWork"; | |
var folder, folders = DriveApp.getFoldersByName(dropbox); |
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 uploadFiles(form) { | |
try { | |
var dropbox = "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(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() { | |
var html = HtmlService.createTemplateFromFile('form-regist') | |
return html.evaluate() | |
} | |
function recordData(data){ | |
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('แผ่น1') | |
ss.appendRow([new Date() ,data.name , "'"+data.phone , data.level ,data.sex,data.birthday,data.cid,data.vacdate,data.timefix]) | |
} |
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 SHEET_NAME = "xxx";//ชื่อชีต | |
var SpreadsheetID = 'xxx' | |
var SCRIPT_PROP = PropertiesService.getScriptProperties(); | |
function doGet(e) { | |
var template = HtmlService.createTemplateFromFile('forms') | |
return template.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME) | |
.addMetaTag('viewport', 'width=device-width , initial-scale=1') | |
} | |
function setup() { |
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(); |
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 LINE_ACCESS_TOKEN = | |
"xxx"; | |
var ss = SpreadsheetApp.openByUrl( | |
"xxx" | |
); | |
var sh = ss.getSheetByName("แผ่น1"); | |
function doPost(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 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
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'); |