Ein herzliches Hallo.
ich bin gerade dabei ein Excelsheet zu öffnen.
Der Code dafür sieht wie folgt aus:
Alles anzeigen
Mein Problem liegt darin, dass ich mit
kein existierendes Excel öffnen kann, sondern immer eine Fehlermeldung bekomme:
Hat jemand hier nen Rat?
Vielen Dank
ich bin gerade dabei ein Excelsheet zu öffnen.
Der Code dafür sieht wie folgt aus:
Quellcode
- void excel::RunExcel(System::String ^sPath, bool bVisible/*=true*/)
- {
- // New Excel Application
- sPath->Format("L:\\Wifi\\Verrechnungssystem\\_excel\\Abrechnung 2009-05.xls");
- System::Object^ wb;
- Excel::Application^ pxlApp = gcnew Excel::ApplicationClass();
- // Add a Workbook
- Excel::Workbook^ pWb;
- pxlApp->Workbooks->Add(System::Type::Missing);
- pWb->Open(wb,sPath);
- //4. Assign the Active Worksheet to a variable
- Excel::Worksheet^ ws = static_cast<Excel::Worksheet^>(pxlApp->ActiveSheet);
- pxlApp->Visible = bVisible;
- return;
- }
Mein Problem liegt darin, dass ich mit
kein existierendes Excel öffnen kann, sondern immer eine Fehlermeldung bekomme:
1>------ Build started: Project: FIBU, Configuration: Debug Win32 ------
1>Compiling...
1>excel.cpp
1>.\excel.cpp(22) : error C3728: 'event Microsoft::Office::Interop::Excel::WorkbookEvents_OpenEventHandler ^Microsoft::Office::Interop::Excel::WorkbookEvents_Event::Open': event does not have a raise method
1>Build log was saved at "file://l:\Wifi\Verrechnungssystem\Projekt\Verrechnungssystem\FIBU\FIBU\Debug\BuildLog.htm"
1>FIBU - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Hat jemand hier nen Rat?
Vielen Dank