I have a google spreadsheet with a script to calculate tallies, weights, etc., and the spreadsheet calls the script's functions many times in it's cells. A few days ago, it started giving me "Script invoked too many times per second for this Google user account" when I would change the data, how can I fix this? I would add a sleep or wait function into the functions, but that would only make them execute slower, correct? It shouldn't effect how fast the spreadsheet invokes them?
相关问题
- How can I force all files in a folder to be owned
- Google Apps Script: testing doPost() with cURL
- Google Apps Script to turn in, grade, and return a
- Script fails on SpreadsheetApp.openById - Requires
- Split Lines and Bold Text within a ui.alert Window
相关文章
- How to allow access for importrange function via a
- Google app script trigger not working
- Set Date/Time to 00:00:00
- indexOf returning -1 despite object being in the a
- Using MIN() inside ARRAYFORMULA()
- How can my Google Apps Script be run by others the
- Google Spreadsheet COUNTIF formula equivalent with
- In Google Sheets how to reference infinite rows in
in my case i reduced the number of function calls using if statement. It is basically a conditional call to function. e.g.
Looking at the error you are getting, which says "Script invoked too many times per second for this Google user account", I don't think adding a sleep will help. It is because the number of times your script is called is the point of contention. Try reducing the number of calls to your script in the spreadsheet (basically reduce the number of cells with formulas invoking the script). If your script has cyclic calls, try removing / reducing them.
You might get a better answer if you can provide some more information on how many cells call your script and perhaps some relevant code from your script itself.