Reputation: 2489
I have an app script attached to my Google Spreadsheet. There is a function that does a bunch of stuff withing the spreadsheet. Here is what it does.
After these 10 steps are complete, the spreadsheet works normally but after 10-15 secs, the sheet will freeze. To get it to work, I need to refresh the page.
I experimented and I found out that if I eliminate Step 6 i.e "Delete Extra rows", the freeze behavior is eliminated. Why does it freeze on this particular step? How do I fix this? I cannot not delete extra rows. Here is the exact piece of code where it freezes.
var unwanted = newAssignmentSheet.getMaxRows() - (parseInt(i) + 6);
newAssignmentSheet.deleteRows(i+7, unwanted); //FREEZES HERE
Point to note :
If I implement Step 6 in isolation, the Spreadsheet does not freeze.
Upvotes: 2
Views: 1490
Reputation: 11
I discovered that if you leave at least one empty row below the last contingent cell, the spreadsheet will not become unresponsive.
Upvotes: 0