3
votes

I am inserting a lot of data into a sheet and the screen flickers when doing so. In VBA and com add-ins there's a property I can set to delay the updates until they're finished.

Is there an equivalent to Application.ScreenUpdating Property in office-js add-ins for excel?

2

2 Answers

2
votes

There is no equivalent for it in Office.js -- not yet, at any rate. There are a number of technical issues that prevent this (FWIW, if you're curious, try toggling ScreenUpdating in VBA while you have a taskpane open; you'll see what I mean).

There are some longer-term ideas that may help with this issue, but to be very transparent, I would expect that it's months and months away. That said, I do encourage you to file a suggestion on https://officespdev.uservoice.com/ (or search if one already exists) and describe your scenario and/or link to a video of the issue you're currently seeing, so we can get it up on folks' radar.

0
votes

See --> https://docs.microsoft.com/en-us/office/dev/add-ins/excel/performance#suspend-screen-updating

Note: The example is horrible...

Application.suspendScreenUpdatingUntilNextSync() gives error 'Application' is undefined

Use:

context.workbook.application.suspendScreenUpdatingUntilNextSync()

I noticed a dramatic improvement adding lots of rows to table, enough that I may not bother w/ the other solution of writing values to rng then converting rng to table.