OLE vs DDE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi
im not able to get any solution but i know a solution sure exists.
i have an excel sheet in which the cell A1 is getting data from a DDE server. So this cell has a formula i.e. =edemo!tik!id0. I want to access this live changing(stock quotes) data in my C# program.
Now since there is no support for DDE in .NET, i m using Automation.
Now i want to trap the sheet change event of this excel sheet in my C# program. Im using sheet_change event handler.

But sheet change event doesnt repsond if the cell is changed due to a formula. i am succesfully able to trap this event if cell is changed manually, but not if the cell has some DDE formula.

how can i get live changing values of that cell in my program using sheet_change handler? or is there any other way? i read an article in MSDN saying OLE does the same work as DDE. So how can i use OLE in this situation?

i think this forum is my last stop.

Vivek
 
Vivek,

You best solution would be to take Excel completely out of the picture and talk to the DDE server directly. Like you said there isn't DDE support built into the framework, but that doesn't mean you can't use it if you're willing to write a wrapper for the DDEML. Fortunately, there are examples out there including a complete library that I wrote and posted on gotdotnet recently.

Watch for wrap...

<http://www.gotdotnet.com/Community/...mpleGuid=2c8c36cf-a974-4b7b-8924-2ed516b75181>
 
Vivek,

The best solution would be to take Excel completely out of the loop. This means that you will need to talk directly to the DDE server. Like you said the framework doesn't support DDE, but that doesn't mean that you can't use it if you're willing code your wrapper for the DDEML. Fortunately, there are examples of this including a completely library I recently posted to gotdotnet.com.

Watch for wrap...

<http://www.gotdotnet.com/Community/...mpleGuid=2c8c36cf-a974-4b7b-8924-2ed516b75181>
 
Back
Top