vbagoogle-apps-scriptrefreshspreadsheetupdating

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


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.


Solution

  • 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.