Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open an excel application with .NET

Status
Not open for further replies.

ysommer

Programmer
Feb 26, 2001
45
0
0
Hi,
I'm Trying to open a excel workbook in c# I add a refernce
in my project to Microsoft Excel Object 10.0.
and I write this code:

Excel.Application oExcel = new Excel.Application();
oExcel.Visible = true;
Excel.Workbook oBook = oExcel.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet);

But I always get the exception "Old Format or Invalid Type Libary"
I cant figure out whats the problem,
Any sugesstions?

Thanks,
Yoel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top