late bound

  • Thread starter Thread starter lee
  • Start date Start date
L

lee

Hi!
I need to open and fill excel cells from my winform
application, however, I do not want to use the excel
object model, I would like to use late binding.
(In VB 6 - CreatObject("Excel") - was used).
Does anyone know how to do this in C#?
A simple sample would be very appreciated!
Thanks alot!
 
lee said:
Hi!
I need to open and fill excel cells from my winform
application, however, I do not want to use the excel
object model, I would like to use late binding.
(In VB 6 - CreatObject("Excel") - was used).
Does anyone know how to do this in C#?
A simple sample would be very appreciated!
Thanks alot!

Late binding was never a good idea in VB. I never like telling people that
their request is not a good idea, but I am afraid in this case there is no
solution. Late binding is horrible and should never have been available in
VB because it has caused far too many problems and those problems are
usually only detectable at runtime. You have a compiler, and the compiler
enforces early binding and type checking, there is a good reason for this.

*Use the compiler Luke!*

Richard
 
The same thing works in vb.net.
call create object and pass in the excel object. the excel object is exposed
by adding a reference to the owc10 library. there are issues with
performance and scalability so do not forget to explicitly clean up the
resources when you are done.
 
Back
Top