Run multiple UDFs sequentially?

Add-in Express™ Support Service
That's what is more important than anything else

Run multiple UDFs sequentially?
Henjo van Rees

Posts: 46
Joined: 2018-12-10
We have various UDFs built with Add-in Express, UDFs which perform a REST call to retrieve data + put in the spreadsheet.

One of our creative users has built a spreadsheet with 100 simultaneous of our UDF, which makes recalculation much slower than running them all sequentially.

Is there a way to programatically (in the UDF or XLLModule?) to limit running only 1 UDF simultaneously?
Posted 17 Jan, 2022 08:32:30 Top
Andrei Smolin

Add-in Express team

Posts: 18185
Joined: 2006-05-11
Hello Henjo,

Neither Excel nor Add-in Express provide such a mechanism. You could change your code to use asynchronous UDFs but this implies that all such UDFs can return a value that the user can see and that won't break formulas relying on that value. Pay attention: Excel won't wait for an async UDF indefinitely. So this may be impossible to achieve this on this route.

Consider caching the values that your UDF might use. You could use a COM add-in or an RTD server caching these values.

Regards from Poland (CET),

Andrei Smolin
Add-in Express Team Leader
Posted 17 Jan, 2022 10:29:36 Top