I am currently busy with developing a financial XLL that will allow the user
to subscribe to a symbol by entering a formula into a cell.
As the starting point, I implemented a volatile function that checks the
availability of data from an internal cache. There is a background thread
that handles the subscriptions, receives the data and updates the cache.
This thread also calls the "Calculate" method of Excel through Automation. I
did it like this because it's not possible to call Excel4 function in a
Now, the problem is, when "Calculate" is called, I get an exception. And as
expected, data does not update in the cell and Excel consumes %100 CPU when
the cell is selected.
I know that the way I call "Calculate" is correct because it works fine for
other volatile functions like "Now()".
My question is; what's wrong with this solution? If it's not possible to do
it in this way, how can an xll function that updates asynchronously be
Any comment/help is appreciated...