Equivalent of “ScreenUpdating” in Google Apps Script (equivalent VBA-GAS )

Frank Montemorano picture Frank Montemorano · Jul 19, 2013 · Viewed 8.7k times · Source

I'm looking for the equivalent VBA-GAS of:

Application.ScreenUpdating = False

I'm running a very long macro in one of my Google Spreadsheets and it takes at least 30 seconds to finish it every time. It would be helpful if the macro didn't refresh the screen after every line of code.

Answer

Zig Mandel picture Zig Mandel · Jul 19, 2013

There isnt. However you should batch all setValues into range writes (ideally a single range write) which will help here.
Only call SpreadsheetApp.flush() at the very end.