google-apps-script

Increase my script performance Google Sheets Script

北城以北 提交于 2021-02-08 03:09:33
问题 I created a function that whenever I run the AppendRow script every row that does not have a dot (".") at the AY column, an array with every information/column that I want from that sheet will be transfered to my main sheet that has around 13k rows atm. Usually about 20-40 rows get pasted into the first sheet everyday and this script automatically re-arranges the columns to my main sheet. PROBLEM: The problem is that each row that gets appended to my main sheet takes around 8-15sec to get

Increase my script performance Google Sheets Script

左心房为你撑大大i 提交于 2021-02-08 03:08:27
问题 I created a function that whenever I run the AppendRow script every row that does not have a dot (".") at the AY column, an array with every information/column that I want from that sheet will be transfered to my main sheet that has around 13k rows atm. Usually about 20-40 rows get pasted into the first sheet everyday and this script automatically re-arranges the columns to my main sheet. PROBLEM: The problem is that each row that gets appended to my main sheet takes around 8-15sec to get

Sum array columns and store the results in a bidimensional array (Javascript)

随声附和 提交于 2021-02-07 20:43:08
问题 I'm using Google Sheets's Script Editor to operate between the values of a table/array. I've got a table that looks like this: | UserA | UserB | UserC | Movie1 | 2 | 8 | 6 | Movie2 | 4 | 6 | 0 | Movie3 | 5 | 2 | 3 | Movie4 | 2 | 7 | 2 | I need to sum every user's rating with the first user's rating, obtaining another array with the results of each sum. In this case, the result should be: | UserA+A | UserB+A | UserC+A | Movie1 | 4 | 10 | 8 | Movie2 | 8 | 10 | 4 | Movie3 | 10 | 7 | 8 | Movie4 |

Sum array columns and store the results in a bidimensional array (Javascript)

僤鯓⒐⒋嵵緔 提交于 2021-02-07 20:39:29
问题 I'm using Google Sheets's Script Editor to operate between the values of a table/array. I've got a table that looks like this: | UserA | UserB | UserC | Movie1 | 2 | 8 | 6 | Movie2 | 4 | 6 | 0 | Movie3 | 5 | 2 | 3 | Movie4 | 2 | 7 | 2 | I need to sum every user's rating with the first user's rating, obtaining another array with the results of each sum. In this case, the result should be: | UserA+A | UserB+A | UserC+A | Movie1 | 4 | 10 | 8 | Movie2 | 8 | 10 | 4 | Movie3 | 10 | 7 | 8 | Movie4 |

Using Google Apps Script API to access another user

跟風遠走 提交于 2021-02-07 20:30:32
问题 I'm really confused with this. I want to use the Gmail API to access and send mail in another account using google apps script. I have enabled Gmail in the Advanced Google Services and have enabled the API on the console. The following code works when I use a value of 'me' but when I try it for another user I get a 'Delegation denied' error. I fully understand that I can't just put in whatever email address I want and expect to be able to access it, but I can't seem to find/understand the

Using Google Apps Script API to access another user

我怕爱的太早我们不能终老 提交于 2021-02-07 20:30:03
问题 I'm really confused with this. I want to use the Gmail API to access and send mail in another account using google apps script. I have enabled Gmail in the Advanced Google Services and have enabled the API on the console. The following code works when I use a value of 'me' but when I try it for another user I get a 'Delegation denied' error. I fully understand that I can't just put in whatever email address I want and expect to be able to access it, but I can't seem to find/understand the

Why does time-based GAS Trigger get disabled for unknown reason in V8?

纵然是瞬间 提交于 2021-02-07 20:22:11
问题 I have (amongst others) the following four functions. fallback() newSubmission() installSubmissionTrigger() uninstallSubmissionTrigger() I have a trigger that: Runs on form submission. Calls fallback() that posts something to the Spreadsheet for review. fallback calls installSubmissionTrigger() . installSubmissionTrigger creates a time-based trigger running every minute. The trigger calls newSubmission() . newSubmission does something I want and calls uninstallSubmissionTrigger() .

Why does time-based GAS Trigger get disabled for unknown reason in V8?

时光毁灭记忆、已成空白 提交于 2021-02-07 20:20:24
问题 I have (amongst others) the following four functions. fallback() newSubmission() installSubmissionTrigger() uninstallSubmissionTrigger() I have a trigger that: Runs on form submission. Calls fallback() that posts something to the Spreadsheet for review. fallback calls installSubmissionTrigger() . installSubmissionTrigger creates a time-based trigger running every minute. The trigger calls newSubmission() . newSubmission does something I want and calls uninstallSubmissionTrigger() .

Getting email upon inserting rows to google sheets

末鹿安然 提交于 2021-02-07 19:58:22
问题 I do have a google sheet where I would like to be notified with any new row/rows inserted to it. Is there any extension which can handle that, or I should use Google Apps Script as I am new for it and never used it before. 回答1: Explanation: You are looking for a trigger to be activated when you insert a new row. The following script will send an email when a new row is inserted in Sheet1 . Feel free to change the name of the sheet: sh.getName()=='Sheet1' . Solution: function sendEmailRow(e) {

Can a Google Apps Script Web App get the user's language and time zone?

十年热恋 提交于 2021-02-07 19:24:20
问题 Is there any possibility for a GAS published as a Web App executing under the identity of the active user and using the Ui Service for user interface to get the preferred language and time zone of the user? Session.getActiveUser() works but you only get the Email Session.getActiveUser().getEmail() . Session.getTimeZone() returns the time zone of the script, not of the user. Could there be a trick to get the web browser ID string with the language preference? 回答1: Session.getActiveUserLocale()