ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HELP:old format or invalid type library (https://www.excelbanter.com/excel-programming/300198-help-old-format-invalid-type-library.html)

Iliopoulos Dimitris

HELP:old format or invalid type library
 
I am trying to write some data to excel 2003 from C#.
I installed windows xp on a machine,visual studio.net and office 2003 from scratch to be sure everything is ok. I also install of course .NET programmability support for the office

I write in C#:

Excel.Application app = new Excel.Application();
app.visible=true;
app.Workbooks.Open("c:/data.xls", System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value)

when i run it the first two lines work good and it goes to Open function a COMException come up telling me "old format or invalid type library", i also tried _Open function but the same thing happened. I f i use an event in the Application object everything works fine. PLEASE HELP



All times are GMT +1. The time now is 03:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com