r/GoogleAppsScript • • May 13 '25

Question Large Data Script Error HELP

I'm running a script that is ingesting a large amount of database data, like ~80,000 rows of 7 columns chalk full of data in every cell. If I run the script to print it to a new sheet that I create just for the import it works fine. I print it in chunks of 50,000 rows and its fine, slow but fine. However, If I target my current database and have it either write over existing data or clear and then re-write the data, it hangs up at row 2857 every time.... the only thing I can think of is that maybe there are too many formulas in my spreadsheet that are trying to fetch the info in the database that it's trying to process too much stuff and freezes. Does anyone know anything about hidden limitations of printing data that interacts with formulas? is there a way to pause all formulas calculating until the script is finished? obviously printing to a blank sheet works fine if it's new, so the only thing I can figure is outside sources interacting with a blank sheet as it gets filled is too intense.

0 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/opatry May 14 '25

SOLVED - Ooof that was a lot of trouble shooting but I sort of did what you suggested. Instead of deleting the formulas all across the workbook, I deleted the thing that the formulas were looking up, barcodes. This automation will run in the middle of the night so I can reasonably delete all of the user's barcodes that they had scanned into the workbook which essentially pauses all of the formulas, run the script, then re print the barcodes back to their original cells. This works wonders. It now prints all ~80,000 rows of data heavy cells without hesitation and then the script puts everything back to normal. And if it fails, it'll put back the barcodes before exiting. Thanks!