XLL+ Class Library

Multi-threaded add-ins

Asynchronous functions

Many developers of Excel add-in functions would like to write functions whose values are updated under the control of the add-in, not merely when the Excel recalculation engine tells them to.

For example, we may want to write a function GETPRICE(StockCode) which retrieves the latest price for a stock, and automatically recalculates when a price change is sent via a data feed. Or we may want to see the interim results of a simulation being run in another process or even on another machine, without locking up the Excel interface for the entire period of the simulation.

This discussion refers to such functions as asynchronous functions. There are two basic cases where asynchronous functions are useful.

The asynchronous functions discussed above are very tricky to implement well. Any add-in which supports the asynchronous update behavior discussed above will usually be implemented as a multi-threaded library, and must integrate itself into Excel's threads very carefully.

We have therefore written the XllPush library as an extension of XLL+, to manage all the complex technical issues involved. The topic continues with a discussion of the XllPush libary.

Next: XllPush library >>