View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Iliopoulos Dimitris Iliopoulos Dimitris is offline
external usenet poster
 
Posts: 1
Default 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