google-apps-script

/dev vs /exec documentation and mishandling

扶醉桌前 提交于 2020-07-16 05:51:08
问题 Let's start with the fact that there isn't much documentation on /dev vs /exec . If you have some valuable info I can't find, I would totally love to see it, no sarcasm. From what I can find, dev is the current editing version, and exec is the last published version of your scripts (or an older version if you so choose). This tells me I should be able to edit my standalone web app scripts without worrying about whether it breaks things for the users, because if it isn't published, they don't

“Service Spreadsheets failed” error when calling insertCells method

大城市里の小女人 提交于 2020-07-15 09:18:46
问题 This may be a simple issue, but I am having some trouble with a section of code. Here is the code: function CreateSheet() { function toTitleCase(str) { return str.replace(/\w\S*/g, function (txt) { return txt.charAt(0) .toUpperCase() + txt.substr(1) .toLowerCase(); }); } var ss = SpreadsheetApp.getActive(); var templatesheet = ss.getSheetByName('Template'); //var fieldName = Browser.inputBox('Field Name', 'Insert Field Name', Browser.Buttons.OK_CANCEL); var ui = SpreadsheetApp.getUi(); var

using a forEach loop to build html table and date/time comes through as null

自闭症网瘾萝莉.ら 提交于 2020-07-14 12:46:06
问题 I am using Google Apps Script and Javascript to build a WebApp. Using a forEach loop to pull data from the GoogleSheet to build the HTML table I have a date time field as the 6th column in my table. When the table goes to populate there is an error - Uncaught TypeError: Cannot read property 'forEach' of null - If i drop the column from the function getTableData the html table will populate without the date time stamp. How do I get the date/time stamp to come through in the forEach loop?

Google Sheets - Get File Name from Hard Drive and Insert into Sheet - (Emulate Excel's Appication.GetOpenFilename)

你离开我真会死。 提交于 2020-07-11 04:37:00
问题 In Excel I can run a VBA script with application.getopenfilename and am able to place the filepath of the items selected into that cell. I'm trying to convert my VBA Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Application.Intersect(Target, Range("AG4:AG910")) Is Nothing Then Dim FileNames As Variant Dim Msg As String Dim i As Integer FileNames = Application.GetOpenFilename(MultiSelect:=True) If IsArray(FileNames) Then For i = LBound(FileNames) To

Google Sheets - Get File Name from Hard Drive and Insert into Sheet - (Emulate Excel's Appication.GetOpenFilename)

喜你入骨 提交于 2020-07-11 04:36:49
问题 In Excel I can run a VBA script with application.getopenfilename and am able to place the filepath of the items selected into that cell. I'm trying to convert my VBA Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Application.Intersect(Target, Range("AG4:AG910")) Is Nothing Then Dim FileNames As Variant Dim Msg As String Dim i As Integer FileNames = Application.GetOpenFilename(MultiSelect:=True) If IsArray(FileNames) Then For i = LBound(FileNames) To

Google Sheets - Get File Name from Hard Drive and Insert into Sheet - (Emulate Excel's Appication.GetOpenFilename)

对着背影说爱祢 提交于 2020-07-11 04:36:02
问题 In Excel I can run a VBA script with application.getopenfilename and am able to place the filepath of the items selected into that cell. I'm trying to convert my VBA Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Application.Intersect(Target, Range("AG4:AG910")) Is Nothing Then Dim FileNames As Variant Dim Msg As String Dim i As Integer FileNames = Application.GetOpenFilename(MultiSelect:=True) If IsArray(FileNames) Then For i = LBound(FileNames) To

Calling library function from html in that library

筅森魡賤 提交于 2020-07-10 10:42:55
问题 In order to share with my colleagues the AppsScript code I am developing, I created a standalone project used as a library in our Docs template. This library contains: a .gs file for the server side code a .html file for the client side sidebar In the sidebar, I have a button which triggers a call to a function from the library with a parameter. The javascript call is the following: google.script.run .withFailureHandler( function(msg, element) { showError(msg, $('#button-bar')); }) .test(); I

How to get info from script.google.com web page with Java?

夙愿已清 提交于 2020-07-10 10:28:38
问题 So, I have my script page and I want to get output that generates on this page. It could've been done with default http client but the problem is that google requires authorization to access this page. So how can I do it right? I also asked about this before but now I realize that my question wasn't clear. 回答1: It is possible to post web app page to be accessible by "anyone even anonymous". So no auth is needed 来源: https://stackoverflow.com/questions/62533751/how-to-get-info-from-script

How to get info from script.google.com web page with Java?

China☆狼群 提交于 2020-07-10 10:28:00
问题 So, I have my script page and I want to get output that generates on this page. It could've been done with default http client but the problem is that google requires authorization to access this page. So how can I do it right? I also asked about this before but now I realize that my question wasn't clear. 回答1: It is possible to post web app page to be accessible by "anyone even anonymous". So no auth is needed 来源: https://stackoverflow.com/questions/62533751/how-to-get-info-from-script

Merge two onEdit with if functions?

匆匆过客 提交于 2020-07-10 10:26:52
问题 I have script for Google Sheets that I collected on interwebs and got some help here. No I have 2 onEdit in conflict. I overcome that by creating script Trigger for onEdit2 . It works but I don't think it is the best solution. Could you help get those two separated onEdit with if functions into one, please? //Dependent Dropdown list function onEdit(e){ // Function that runs when we edit a value in the table. masterSelector(master1,master2,master3,master4); var activeCell = e.range; // It