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
----------code.gs------------- | |
function doGet() { | |
var html = HtmlService.createTemplateFromFile('form') | |
return html.evaluate() | |
} | |
function recordData(data){ | |
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('แผ่น1') | |
ss.appendRow([new Date() ,data.name , "'"+data.phone , data.level]) | |
} |
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
------------Code.gs---------------- | |
var ss= SpreadsheetApp.openByUrl('aaa'); | |
function doGet(e) { | |
var htmlOutput = HtmlService.createTemplateFromFile('Login'); | |
htmlOutput.message = ''; | |
return htmlOutput.evaluate(); | |
} | |
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
/////GS//////// | |
function doGet(e) { | |
return HtmlService.createTemplateFromFile('index') | |
.evaluate().setTitle('ระบบรับสมัครนักเรียนออนไลน์ ปีการศึกษา 2563');//แก้จุดที่ 1 | |
} | |
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('PDF') | |
.addItem('สร้างไฟล์ PDF','run_pdf') |
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 submit() { | |
var ss = SpreadsheetApp.openByUrl('aaa') | |
var sheet = ss.getSheetByName('การตอบแบบฟอร์ม 1') | |
var range = sheet.getRange(sheet.getLastRow(), 2, 1, sheet.getLastColumn()) | |
var data = range.getDisplayValues() | |
var value0 ,value1,value2 | |
data.forEach(r=>{ | |
value0 = r[0] | |
value1 = r[1] | |
value2 = r[2] |
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 = "aaa"; | |
var ss = SpreadsheetApp.openById("aaa"); | |
var sh = ss.getSheetByName("aaa"); | |
function doPost(e) { | |
if (typeof e === "undefined") { | |
return; |
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
สูตรรันเลขคิวอัตโนมัติ | |
={"ลำดับคิว";ARRAYFORMULA ("Q" & text (ROW (B1:INDEX (B:B, COUNTA (B:B)-1)), "000"))} | |
------------ | |
โค้ด.gs | |
------------- | |
var data | |
var ss = SpreadsheetApp.openById('aaa') | |
var sheet = ss.getSheetByName('aaa') | |
var range = sheet.getDataRange().getDisplayValues() | |
function doGet(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
<!DOCTYPE html> | |
<html> | |
<head> | |
<base target="_top"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | |
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Prompt"> | |
<style>body {font-family: "Prompt"; font-size: 16px;}th,td {text-align: center }</style> |
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
---พัฒนาโค้ดโดย อภิวัฒน์ วงศ์กัณหา เวอร์ชั่นอัปเดทล่าสุด สมบูรณ์แบบที่สุด ^_^ | |
--ขอขอบคุณ อ.ดรัณภพ ที่ช่วยปรับโค้ด index.html ให้ได้ออกมาตามที่ต้องการ | |
------CODE.GS------------ | |
function doGet(e) { | |
var htmlOutput = HtmlService.createTemplateFromFile('index'); | |
htmlOutput.search=''; | |
return render('index'); | |
} | |
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
-----code.gs----------- | |
function doGet(e) { | |
var htmlOutput = HtmlService.createTemplateFromFile('index'); | |
htmlOutput.search=''; | |
//return htmlOutput.evaluate(); | |
return render('index'); | |
} | |
function doPost(e) { | |
var search =e.parameter.search; |
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
CODE.GS | |
_________________________________________________________________________ | |
function doGet(e) { | |
var htmlOutput = HtmlService.createTemplateFromFile('PageLogin'); | |
htmlOutput.message = ''; | |
return htmlOutput.evaluate(); | |
} |
NewerOlder