prashant patel
prashant patel

Reputation: 1225

Get excel cell value without UI update in Excel Addin Nodejs Api

The key problem is that in our native web app we have an MVC architecture where the calculation engine, controller and UI are separate so when we recalculate we do not need to update UI ("expensive" operation).

As an add-in we are bound by excel API and we cannot find a way to run a recalculation without having to refresh the grid.

Even if we turn off UI update, when we need to get the value in a cell the UI is forced to update.

We call api doNotUpdateScreenUntillNextSync() but in order to get updated values we have to call context.sync() that will update the screen.

Any idea how to get cell value without UI update in excel.

Upvotes: 0

Views: 304

Answers (1)

ginger jiang
ginger jiang

Reputation: 69

Thanks for the question. Currently we only support context.sync level UI update suspend by Application.suspendScreenUpdatingUntilNextSync(). Details can refer to https://learn.microsoft.com/en-us/javascript/api/excel/excel.application?view=excel-js-preview#suspendApiCalculationUntilNextSync__

Based on your description, maybe you can get the original value in a cell and calculate it then store the value in somewhere else. Then to update it until you want to refresh the UI.

And if you do want a Excel session level UI suspend API, please submit the requirement at Github. Thanks!

Upvotes: 3

Related Questions