Programming Excel with C++ .Net (MFC)
"H." wrote in message
...
Cheers Fredrik.
I tried the translation program and can make no sense of the code it's
producing.
However I did make me think about manually translating VBA to C++, since
the
classes are similiar and there is some help for them in VBA.
I have just realise that I can use covOptional for optional variants and
have been able use CWorkbooks::Open() method to open my file.
Thanks for pointing me in the right direction.
Hamish
AWell, with late binding, the code isn't easy to understand. The absoultely
easiest way to auomate Excel, using compiled code, is to use VB6. You simplu
pass Excel.Application to a property and then write code which will be very
similar to VBA. If you use C++, you should #imprt excel.exe (Excel 2003) so
that you can use early binding.
/Fredrik
|