Question

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?

No correct solution

OTHER TIPS

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.

in my case i reduced the number of function calls using if statement. It is basically a conditional call to function. e.g.

if(Col5="","",myFunction())//function is called when Col5 is not empty
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top