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 onOpen() { | |
let ui = SpreadsheetApp.getUi() | |
ui.createMenu("PDF") | |
.addItem("สร้าง PDF", "pdfForm") | |
.addItem("สร้าง PDF ทั้งหมด", "pdfFormAll") | |
.addToUi() | |
} | |
function pdfFormAll(){ | |
let docId = 'ID ของ Google Docs'; | |
let sheetId = 'ID ของ Google Spreadsheet'; |
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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
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
<?php | |
function json_response($code = 200, $message = null) | |
{ | |
// clear the old headers | |
header_remove(); | |
// set the actual code | |
http_response_code($code); | |
// set the header to make sure cache is forced | |
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900"); |
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 sheetID = 'xxx'//แก้จุดที่1 | |
function doGet(e) { | |
if (!e.parameter.page || e.parameter['page']=='index') { | |
var htmlOutput = HtmlService.createTemplateFromFile('index') | |
htmlOutput.message = ''; | |
return htmlOutput.evaluate() | |
.setTitle("web app") | |
.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
<style> | |
.btn-group-xs > .btn, .btn-xs { | |
padding: .25rem .4rem; | |
font-size: .875rem; | |
line-height: .5; | |
border-radius: .2rem; | |
} | |
</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
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
/* | |
1) Open https://popcat.click | |
2) Open console (F12) | |
3) Insert code & run | |
*/ | |
var event = new KeyboardEvent('keydown', { | |
key: 'g', | |
ctrlKey: true |
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() | |
.addMetaTag('viewport','width=device-width , initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) | |
} | |
function include(filename) { | |
return HtmlService.createHtmlOutputFromFile(filename).getContent(); | |
} |
OlderNewer