Object Handler

Apr 28, 2015 at 1:25 PM
Hi Govert

I am writing an ObjectHandler using Excel DNA and C#
Right now I have a naive implementation which creates a new handle every time.

I would like to do something like

if (calling cell is empty)
create new handle and return
read the current value of the cell
delete the existing handle
create a new handle and return

Is it possible to read the value in the current cell. I have read a few posts online and tried but it hasn't worked.

Thanks a lot
Apr 28, 2015 at 1:35 PM
Hi Amit,

I suggest you start with the ObjectHandles sample on GitHub: https://github.com/Excel-DNA/Samples/tree/master/ObjectHandles
That doesn't quite work as you explain, but is allows you to be notified when a handle cell is cleared or the relevant inputs changed.

Apr 28, 2015 at 1:49 PM
Hi Govert

Thanks for the quick response. I took a brief look at the example.

It doesn't quite work for the case I am trying to solve. For the same inputs I have to create a new handle every time - this is because the handle is created based on the latest data retrieved from a server (which updates continuously from a market data service). The only thing I want to do is read the old handle from the calling cell and clear it out of memory.

In fact, the handles and objects also are created on a server cluster - so I want to send a request to the server cluster to clear out the old handle from its memory