google-apps-script-web-application

Response and Error handling in Google Apps Scripts. doPost? withFailureHandler()?

元气小坏坏 提交于 2020-04-15 15:43:42
问题 I hope everyone is safe and healthy given the current situation. I have a question in regards to a project with google apps script. I have a web app and I have been able to figure out routing with doGet() using links etc. //global variables const sheetId = "foo"; const Route = {}; Route.path = function(route, callback){ Route[route] = callback; } function doGet(e){ Route.path("newAccountForm",loadNewForm); Route.path("updateBrandForm", loadUpdateForm); if(Route[e.parameters.v]) { return Route

Null value returned to Apps Script webapp for a certain spreadsheet by server function

筅森魡賤 提交于 2020-04-13 06:11:29
问题 I am trying to return the data in the spreadsheet to an Apps Script published as a webApp. However, for one of my spreadsheets (link), the returned data is null . I logged the the data before returning to make sure that it isn't null, and I can see them in the logs. This is my code: function doGet(){ return HtmlService.createHtmlOutputFromFile('index'); } function spreadsheetTest() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheetByName("Sheet1"); var maxRows = sheet

Null value returned to Apps Script webapp for a certain spreadsheet by server function

匆匆过客 提交于 2020-04-13 06:11:07
问题 I am trying to return the data in the spreadsheet to an Apps Script published as a webApp. However, for one of my spreadsheets (link), the returned data is null . I logged the the data before returning to make sure that it isn't null, and I can see them in the logs. This is my code: function doGet(){ return HtmlService.createHtmlOutputFromFile('index'); } function spreadsheetTest() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheetByName("Sheet1"); var maxRows = sheet

Why can't I call a server function from the sidebar in Google AppScript for Sheets?

做~自己de王妃 提交于 2020-03-19 14:38:47
问题 I'm having problems calling a server-side AppScript function from a html sidebar in Google Sheets. I've replicated my issue with the simple example code below. What it should do Clicking the button should call alert in my Code.gs script and display an alert to the user. What actually happens Clicking the button shows the error: We're sorry, a server error occurred while reading from storage. Error code PERMISSION_DENIED. There are no entries in the 'executions' section of the AppScript

Why can't I call a server function from the sidebar in Google AppScript for Sheets?

爷,独闯天下 提交于 2020-03-19 14:32:57
问题 I'm having problems calling a server-side AppScript function from a html sidebar in Google Sheets. I've replicated my issue with the simple example code below. What it should do Clicking the button should call alert in my Code.gs script and display an alert to the user. What actually happens Clicking the button shows the error: We're sorry, a server error occurred while reading from storage. Error code PERMISSION_DENIED. There are no entries in the 'executions' section of the AppScript

Google Apps Script PERMISSION_DENIED with sheets addon

你说的曾经没有我的故事 提交于 2020-03-04 05:05:19
问题 I tried to implement a simple "Multi selector sidebar" extension based on THIS SHEET which I found in this Google support thread When I copy the sheet it works fine but when I try to put the exact same code in my real sheet, it doesn't work anymore. It throws an error when I try to access the GA function from within the template. I have created a simplified test project which also fails to work for me. To reproduce the error: Create a new Spreadsheet at https://docs.google.com/spreadsheets/

Google Apps Script PERMISSION_DENIED with sheets addon

ⅰ亾dé卋堺 提交于 2020-03-04 05:05:10
问题 I tried to implement a simple "Multi selector sidebar" extension based on THIS SHEET which I found in this Google support thread When I copy the sheet it works fine but when I try to put the exact same code in my real sheet, it doesn't work anymore. It throws an error when I try to access the GA function from within the template. I have created a simplified test project which also fails to work for me. To reproduce the error: Create a new Spreadsheet at https://docs.google.com/spreadsheets/

Google Webapp: How to dynamically pass array values to jquery script

这一生的挚爱 提交于 2020-02-03 23:38:07
问题 I've been working on an answer to StackOverflow question Datepicker: Disabling dates in the data. I've successfully developed a small webapp that excludes specific dates from a jQuery Datepicker using the beforeShowDay option and an array of hardcoded dates. Problem At present, the array of excluded dates is hard coded, but these dates should be generated dynamically. Although I have a function in code.gs getuserdates() which will return the "userdates" array ["12/13/2019", "12/14/2019", "12

Is it possible to import XML or JSON data from a table within a Word online document into Apps Script website as an HTML table?

江枫思渺然 提交于 2020-01-30 08:20:29
问题 I am building a web app using Apps Script. In this web app I have a table that needs to be populated from a table in a Word doc in OneDrive. This document is updated regularly, so I would prefer to programmatically update the content of the html table in Apps Script. Is this possible? If so, can anyone give me guidance as to how to accomplish this? I've started looking into importing xml from a url, but I'm not sure that I'm on the right track. 回答1: You need to incorporate the following steps

build real time dashboard using google apps script

独自空忆成欢 提交于 2020-01-22 14:07:47
问题 I want to be able to update my web app constantly (in real time) such that anytime there's an update on my Google Sheet (via a webhook configured using apps script's doGet function), the same is shown in the HTML dashboard that I've built. I don't need help with setting up my sheet, or the webhook or the HTML dashboard - I have all of that already setup. I do need help / advise on how can I update my HTML dashboard (web app) any time there's an update either on my doGet function or on the