google-apps-script

Issue making a response from a google form showing error “”TypeError: Cannot read property “values” from undefined. (line 2, file “Code”)“”

你。 提交于 2020-08-10 20:21:30
问题 In Google Forms, I am attempting to create an email response that includes a case number that is generated in the form responses (column titled code) but unfortunately, I have come across the error: typeError: Cannot read property "values" from undefined. (line 2, file "Code") I am a complete novice regarding this but I have set the trigger function and am given this error in the email that is sent in a reply. Find a copy of the responses docs below: https://docs.google.com/spreadsheets/d

Issue making a response from a google form showing error “”TypeError: Cannot read property “values” from undefined. (line 2, file “Code”)“”

北战南征 提交于 2020-08-10 20:20:34
问题 In Google Forms, I am attempting to create an email response that includes a case number that is generated in the form responses (column titled code) but unfortunately, I have come across the error: typeError: Cannot read property "values" from undefined. (line 2, file "Code") I am a complete novice regarding this but I have set the trigger function and am given this error in the email that is sent in a reply. Find a copy of the responses docs below: https://docs.google.com/spreadsheets/d

Google Script sort JSON nested Arrays

被刻印的时光 ゝ 提交于 2020-08-10 20:01:13
问题 im trying to sort a nested array before copying back to Gsheet, i was helped on a previous part here, however when i save the script i get an error "illegal Character", i have copied the script to a new sheet and it saves and works, however on my current script i can seem to save the script without that error, is there another way i can re-order that set of arrays. I have to use my current sheet as there is a lot more code which i cannot just leave so hence i have to use my current sheet

Google Script sort JSON nested Arrays

那年仲夏 提交于 2020-08-10 20:01:07
问题 im trying to sort a nested array before copying back to Gsheet, i was helped on a previous part here, however when i save the script i get an error "illegal Character", i have copied the script to a new sheet and it saves and works, however on my current script i can seem to save the script without that error, is there another way i can re-order that set of arrays. I have to use my current sheet as there is a lot more code which i cannot just leave so hence i have to use my current sheet

Data protection issue with other editors except owner in Google App Scripts having onEdit() trigger

混江龙づ霸主 提交于 2020-08-10 18:58:31
问题 I have a google spreadsheets with 6 editors including me as a owner. When any editor except the owner of the sheets selects certain value in the dropdown menu, the onEdit trigger attached with classAttendance() starts working. That's fine. But the issue is, every time the data is protected on the owner name (has edit access) though the user is different editor. It should be on that specific editor name and should have edit access to it. How to solve it? function classAttendance(e){ var

How to import data from another Google Sheet using Google Script without using Spreadsheet ID

旧时模样 提交于 2020-08-10 16:29:14
问题 I have a Google Script that imports my data range from one Google Sheet to another Google Sheet and it works perfectly. My issue is however the original data sheet gets updated daily by a third party (CloudHQ) which replaces the original version, this means that a new spreadsheet ID is created which renders this script incorrect daily. Is there a way to import a data range by another google script method by using something constant such as the file name or file location? Please find my code

How to apply a formula to visible columns only?

百般思念 提交于 2020-08-10 13:15:12
问题 I need the formula to ignore a range if it`s hidden. I know that there is 'SUBTOTAL' that works for rows, but in my case, I need something for columns. I also tried to go with 'CELL("width")' with no luck. Here is the sample spreadsheet: https://docs.google.com/spreadsheets/d/10BNrnAyQw89gy-Sj3CLiz4AgVtFI0AjXTvc0REGGTfY/edit?usp=sharing Is there any other option to ignore hidden columns in a count formula? 来源: https://stackoverflow.com/questions/63241198/how-to-apply-a-formula-to-visible

How to apply a formula to visible columns only?

我只是一个虾纸丫 提交于 2020-08-10 13:14:32
问题 I need the formula to ignore a range if it`s hidden. I know that there is 'SUBTOTAL' that works for rows, but in my case, I need something for columns. I also tried to go with 'CELL("width")' with no luck. Here is the sample spreadsheet: https://docs.google.com/spreadsheets/d/10BNrnAyQw89gy-Sj3CLiz4AgVtFI0AjXTvc0REGGTfY/edit?usp=sharing Is there any other option to ignore hidden columns in a count formula? 来源: https://stackoverflow.com/questions/63241198/how-to-apply-a-formula-to-visible

How do I change the “Resize row” setting from “Fit to data” to “Specify row height, no really, I want this row to be 21 pixels tall no matter what”?

房东的猫 提交于 2020-08-10 05:29:11
问题 I've tried: var ss = SpreadsheetApp.openById('1-hcd6JWmWZ9MrSkt2_N8PXDGz4j-my-sheet-id'); var sheet = ss.getSheetByName('test'); sheet.setRowHeight(1, 21); This works if the row is empty, which is useless since why would I have an empty row at the non-default height. However, even though it changes the row height, if you manually bring up the "Resize rows..." dialog, it's still set to "Fit to data" instead of "Specify row height". This is a pretty frustrating when combined with a couple other

getSheets() Google Apps Script multiple calls issue

亡梦爱人 提交于 2020-08-09 10:46:08
问题 (For the purposes of this post, I will refer to each "sheet" in a google spreadsheet as a tab, I find the naming convention to be confusing when reading) In a Google Sheets add-on, I am attempting to create a setup process that will allow the user to enter the link of a Google Form based on a prompt for that form (the reason I don't just pull all the ID's into the code manually is that the forms themselves being used may change from user to user), and have that form's responses be linked to