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
++++++++++++++++++++ สร้างฟังก์ชั่น จัดการ Font วางที่บรรทัด 246 ++++++++++++++++++++++++++ | |
function createTable() { | |
pdfMake.fonts = { | |
THSarabun: { | |
normal: 'THSarabun.ttf', | |
bold: 'THSarabun-Bold.ttf', | |
italics: 'THSarabun-Italic.ttf', | |
bolditalics: 'THSarabun-BoldItalic.ttf' | |
}, | |
Prompt: { |
This file has been truncated, but you can view the full file.
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
this.pdfMake = this.pdfMake || {}; this.pdfMake.vfs = { | |
"THSarabun-Bold.ttf": "AAEAAAAYAQAABACAR0RFRgQiB0AAAXOIAAAANEdQT1OM1rlcAAFzvAAAF0ZHU1VC+npHzgABiwQAABqmTFRTSEA59scAAApcAAACAU9TLzKlWlR9AAACCAAAAGBQQ0xUhJ9GzQABc1AAAAA2VkRNWGiFb+oAAAxgAAAF4GNtYXCnLjp3AABASAAABoZjdnQgABQAAAAASEgAAAACZmVhdAAGBFcAAaWsAAAALGZwZ20GWZw3AABG0AAAAXNnYXNwABcACQABc0AAAAAQZ2x5ZoBj9bQAAEhMAADWFGhkbXhIFrcjAAASQAAALghoZWFk44Bw0AAAAYwAAAA2aGhlYQVUBCoAAAHEAAAAJGhtdHjEmvsNAAACaAAAB/RrZXJuvtnCrAABIlwAACE8bG9jYTuncdIAAR5gAAAD/G1heHAEOgQ6AAAB6AAAACBtb3J4A9e4DQABpdgAACYYbmFtZXNyEM4AAUOYAAAiqHBvc3Th7BqnAAFmQAAADP9wcmVwuAAAKwAASEQAAAAEAAEAAAABAABv2UP6Xw889QAZA+gAAAAAwTiFPAAAAADBOKkr/i7+NwOzA0wAAQAJAAIAAAAAAAAAAQAAA1L/BgAeA8z+Lv9aA7MAAQAAAAAAAAAAAAAAAAAAAf0AAQAAAf0B0gApAFEABgABAAAAAAAKAAACAAIVAAMAAQADAYwCvAAFAAACvAKKAAAAjAK8AooAAAHdAB4A+ggFAgsFAAQCAAIAA6EAAG9QACBaAAAAAAAAAABwc2sgACAAIPsCA1L/BgA8A1IA+mABAYOAAAAAAVQB3AAAACAADQK6ADUA3AAAAKgAJAEjADEBzgAhAW8AKwKwACcB5gAjAKkAMQD0ACwA9AALAVcAJwGhAB0ArAAZAOIADQCsACYBFP/iAXoAHAF6AEYBegAYAXoAGgF6ABwBe |
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
<script> | |
const WIDTH = 800 | |
let myFile = document.getElementById("myFile") | |
myFile.addEventListener("change", (event) =>{ | |
let image_file = event.target.files[0] | |
let reader = new FileReader | |
reader.readAsDataURL(image_file) | |
reader.onload = (event) => { | |
let image_url = event.target.result | |
let image = document.createElement("img") |
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
function onOpen() { | |
const ui = SpreadsheetApp.getUi(); | |
ui.createMenu('สร้างรายงาน') | |
.addItem('PDF','myPDF') | |
.addToUi(); | |
} | |
function myPDF(){ | |
const data = checkSel(); | |
if(data.sName == 'ชีต1' && data.results){ |
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 token = 'xxx' | |
var ss = SpreadsheetApp.openById('xxx') | |
var sh = ss.getSheetByName('xxx') | |
var row = sh.getLastRow(); | |
var today = Utilities.formatDate(new Date(), "GMT+7", "dd/MM/yyyy") | |
var time = Utilities.formatDate(new Date(), "GMT+7", "HH:mm") | |
Logger.log(time) |
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 copyData() { | |
importRange( | |
"xxx", | |
"yyy", | |
"xxx", | |
"yyy" ); | |
} | |
function importRange(sourceID, sourceRange, targetID, targetRange) { | |
const sourceSS = SpreadsheetApp.openById(sourceID); | |
const sourceRng = sourceSS. getRange (sourceRange); |
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
const FOLDER_ID = '' | |
const onFormSubmit = ({ response } = {}) => { | |
try { | |
const files = response | |
.getItemResponses() | |
.filter((itemResponse) => itemResponse.getItem().getType().toString() === 'FILE_UPLOAD') | |
.map((itemResponse) => itemResponse.getResponse()) | |
.reduce((a, b) => [...a, ...b], []); | |
if (files.length > 0) { | |
const subfolderName = response.getItemResponses()[0].getResponse()//ดึงจากคำถามจากช่องกรอกชื่อ |
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) | |
} | |
function addRecord(obj){ | |
const ws = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet() | |
const data = ws.getRange(1,1,ws.getLastRow(),1).getValues() | |
var maxNum = 0 |
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) | |
} | |
function getSheetData() { | |
var data = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getDataRange().getValues() | |
return data |
NewerOlder