This file contains hidden or 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(IFERROR(VLOOKUP(B2,Room!A:B,2,0),"ไม่มีข้อมูล")) | |
function send_News() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheetByName("News"); | |
var lastRows = sheet.getLastRow(); | |
var message=""; | |
for(var i=2;i<=lastRows;i++) { | |
var token = sheet.getRange(i,1).getValue() | |
message = sheet.getRange(i,3).getValue() |
This file contains hidden or 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") | |
for (i = 2; i <= row; i++) { |
This file contains hidden or 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 SCRIPT_PROP = PropertiesService.getScriptProperties(); | |
function doGet(e) { | |
return HtmlService.createHtmlOutputFromFile('forms.html').setTitle("Registration With Document"); | |
} | |
function uploadFileToGoogleDrive(data, file, name, pid, email, tel) { | |
try { | |
var dropbox = "Received Files"; |
This file contains hidden or 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("ระบบค้นหาข้อมูล") | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); | |
} | |
function processForm(formObject){ | |
var concat = formObject.searchtext+formObject.searchtext2; |
This file contains hidden or 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() | |
} | |
function userClick(data) { | |
let ss = SpreadsheetApp.openById('xxx'); | |
let sheet = ss.getSheets()[0]; | |
let response = Maps.newGeocoder().reverseGeocode(data.lat, data.lon); | |
let geoAddress = response.results[0].formatted_address; | |
sheet.appendRow([data.username,Utilities.formatDate(new Date(), "GMT+7", "MM/dd/yyyy HH:mm:ss"), `${data.lat},${data.lon}`, geoAddress]) |
This file contains hidden or 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() | |
} | |
function userClick(data) { | |
let ss = SpreadsheetApp.openById('xxx'); | |
let sheet = ss.getSheets()[0]; | |
let response = Maps.newGeocoder().reverseGeocode(data.lat, data.lon); | |
let geoAddress = response.results[0].formatted_address; | |
sheet.appendRow([data.username,Utilities.formatDate(new Date(), "GMT+7", "MM/dd/yyyy HH:mm:ss"), `${data.lat},${data.lon}`, geoAddress]) |
This file contains hidden or 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 sheetName = 'xxx' | |
var scriptProp = PropertiesService.getScriptProperties() | |
function intialSetup () { | |
var activeSpreadsheet = SpreadsheetApp.getActiveSpreadsheet() | |
scriptProp.setProperty('key', activeSpreadsheet.getId()) | |
} | |
function doPost (e) { | |
var lock = LockService.getScriptLock() |
This file contains hidden or 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 hidden or 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 hidden or 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("WebApp: Search By Password") | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); | |
} | |
/* PROCESS FORM */ |