K
k-w
Hi all
In vb I do:
Dim Ex As New Excel.Application
Ex.Workbooks.Open "c:\tmp\Book1.xls"
Similar code in VC doesn't work:
#pragma comment(lib, "ole32.lib")
#import "c:\program files\Microsoft Office\OFFICE11\XL5EN32.OLB"
rename("DialogBox","__AA__")
/* ... */
Excel::ApplicationPtr app(L"Excel.Application");
((Excel::WorkbooksPtr)app->Workbooks())->Open(_variant_t("c:\\tmp\\Book1.xls"));
Index is wrong - yes because we didn't open Workbook yet
How to eliminate/fix/bypass this error
Or may be it should be different way to open Excel workbook in VC?
Best regards,
Vasiliy
In vb I do:
Dim Ex As New Excel.Application
Ex.Workbooks.Open "c:\tmp\Book1.xls"
Similar code in VC doesn't work:
#pragma comment(lib, "ole32.lib")
#import "c:\program files\Microsoft Office\OFFICE11\XL5EN32.OLB"
rename("DialogBox","__AA__")
/* ... */
Excel::ApplicationPtr app(L"Excel.Application");
((Excel::WorkbooksPtr)app->Workbooks())->Open(_variant_t("c:\\tmp\\Book1.xls"));
Index is wrong - yes because we didn't open Workbook yet
How to eliminate/fix/bypass this error
Or may be it should be different way to open Excel workbook in VC?
Best regards,
Vasiliy