google-apps-script-web-application

Embedding Google Apps Script in an iFrame

本秂侑毒 提交于 2019-12-17 11:03:46
问题 I am trying to embed a page that is dynamically built using Javascript in Google Apps Script into my website in an iFrame, but the iFrame's content isn't shown. Google Apps Script has a same-origin policy which prevents it from loading. What I am trying to do is (I removed the full link): <iframe src="https://script.google.com/a/macros/SCRIPT_ID"></iframe> The error I am getting is: Refused to display 'https://script.google.com/a/macros/SCRIPT_ID' in a frame because it set 'X-Frame-Options'

how to upload to google drive with python

邮差的信 提交于 2019-12-14 01:50:48
问题 I want upload file to google drive with google script and python. I don't want to do this with API because it's with json file and requesting a password to google account. I want to send from the Python file without a json file and without requesting a google account. I want to create a script in google script that will upload the file to the site. I found how to do it with html: function saveFile(data,name,folderName) { var contentType = data.substring(5,data.indexOf(';')); var file =

Pass dynamic HTML table to spreadsheet

淺唱寂寞╮ 提交于 2019-12-13 08:28:00
问题 I have a dynamic HTML table which I want to pass its values to a Google Spreadsheet through GS code. <div class="container"> <table style="width: auto" id="myTable" class=" table order-list"> <!-- ### INICIO DO CODIGO DA TABELA TD = TABLE DATA / TR = TABLE ROW / TH = TABLE HEADING### --> <!-- CABEÇALHO --> <tr> <th>Ref.</th> <th>Produto</th> <th>Categoria</th> <th>Marca</th> <th>Tipo de Venda</th> <th>$ Etiqueta</th> <th>$ Real</th> <th>Quantidade</th> </tr> <!-- LINHAS --> <tr> <td><input

Google app script: Send mail, inlineImage from js File

纵饮孤独 提交于 2019-12-13 03:45:32
问题 I use google.script.run to use the MailApp API in google app script and I pass a mail object like this : google.script.run.sendMail(mail); The mail object is structured like this : var mail = { to:"", cc:"", subject:"", htmlBody:"", inlineImages: inlineImages } inlineImages is a Javascript object that map key string to image data (BlobSource) from google ressources But then I pass File object in inlineImages I get Failed due to illegal value . EDIT : I get the inlineImages like this : var

Close Htmlservice popup

别说谁变了你拦得住时间么 提交于 2019-12-11 17:03:58
问题 I am wondering if is possible to close the htmlservice popup when the submit button is hit on the Google form function launchForm() { var form = FormApp.openById('15Qw9jmolybvMbx2d3UhddEWHrKe0zBiV5_asKXolsM0'); var formUrl = form.getPublishedUrl(); // var response = UrlFetchApp.fetch(formUrl); // var formHtml = response.getContentText(); var htmlApp = HtmlService .createHtmlOutput('<h1>Your Organization</h1>') .append('<iframe src ="' + formUrl + '?embedded=true" width="1000" height="900"

Pass HTML Table to Google Spreadsheet. Get Cell Values out of a Dynamic Table

浪子不回头ぞ 提交于 2019-12-11 03:15:20
问题 I have a table within a form that looks like this: The HTML and JavaScript <form> <table border="1" id="tblSample"> <tr> <th>Col_one</th> <th>Col_two</th> <th>Col_three</th> </tr> <tr> <td><input type="text" name="txtRowa1" id="txtRowa1" size="5" /></td> <td> <input type="text" name="txtRowb1" id="txtRowb1" size="15" /> </td> <td> <input type="text" name="txtRowc1" id="txtRowc1" size="15" /> </td> </tr> <tr> <td><input type="text" name="txtRowa2" id="txtRowa2" size="5" /></td> <td> <input

Pass dynamic HTML table to spreadsheet

戏子无情 提交于 2019-12-02 14:01:21
I have a dynamic HTML table which I want to pass its values to a Google Spreadsheet through GS code. <div class="container"> <table style="width: auto" id="myTable" class=" table order-list"> <!-- ### INICIO DO CODIGO DA TABELA TD = TABLE DATA / TR = TABLE ROW / TH = TABLE HEADING### --> <!-- CABEÇALHO --> <tr> <th>Ref.</th> <th>Produto</th> <th>Categoria</th> <th>Marca</th> <th>Tipo de Venda</th> <th>$ Etiqueta</th> <th>$ Real</th> <th>Quantidade</th> </tr> <!-- LINHAS --> <tr> <td><input type="text" name="refProd" size="10" /></td> <td><input type="text" name="nomeProd" size="30" /></td> <td

issue with Embedding Google Apps Script in an iFrame

蓝咒 提交于 2019-12-02 08:34:45
i have a multi page Web App. I want after log in, user sees the list of his team mate and mark their attendance status. My issue is I can't show that in an iFrame rather than google script original one! For instance I wanted to iFram it to my own web page. it is two days I can't overcome this issue, I read lots of posts in this regard and also tried another app from scratch, but no luck yet. Can you guys please help me on this? for clarification, I am redirecting the user inside the frame using render function. So as @theMaster mentioned it is not a multi page web app. here is my doGet and

Get gmail address using Google Apps Script, Error: redirect_uri_mismatch

独自空忆成欢 提交于 2019-12-01 13:42:48
I try get gmail address of user use my app script. I have consulted several places : https://developers.google.com/identity/sign-in/web/sign-in https://developers.google.com/apps-script/guides/html/ and in the question I posted before but can't do it and there's a new problem. This code file gs: function doGet(e) { var tmp = HtmlService.createTemplateFromFile("testapi"); return tmp.evaluate(); } This code file html: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="google-signin-client_id" content="1xxxxxxxxxx-xxxxxxxxi87eht.apps.googleusercontent.com"> <title>Oauth2 web</title>

Get gmail address using Google Apps Script, Error: redirect_uri_mismatch

孤者浪人 提交于 2019-12-01 11:59:29
问题 I try get gmail address of user use my app script. I have consulted several places : https://developers.google.com/identity/sign-in/web/sign-in https://developers.google.com/apps-script/guides/html/ and in the question I posted before but can't do it and there's a new problem. This code file gs: function doGet(e) { var tmp = HtmlService.createTemplateFromFile("testapi"); return tmp.evaluate(); } This code file html: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="google