Excel communicating to csharp application.

R

roger.camargo

My Excel application, needs information that my chsarp application
holds.
My question is what aproach I can take to solve this issue.
I'm really drawing a blank right now.

Any help will be appreciated.
 
B

Bernie Deitrick

Roger,

It depends on which application is the dictator. If your c# application is the dictator, then open
Excel using csharp by setting an object reference, and just write the information straight into
Excel using a structure like oExcel.Workbooks( ).Worksheets( ).Range( ).Value = ....

If you want Excel to be the dictator, then your c# application needs to have its object exposed to
Excel's VBA, in which case I can't help you, cause I have no idea how to do that.

Or - you could do it the really old-fashioned way of writing the information to a file in a known
location using your C# app, having Excel check for the file, reading it to get the information, and
deleting it to let your C# app know that it has been read.

HTH,
Bernie
MS Excel MVP
 
Top