I'm trying to open Excel from my VB.net application and I always get the following Error Message:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Office.exe
Additional information: Old format or invalid type library.
I've added the Microsoft Excel 9.0 Object library reference and the Microsoft Office 9.0 Object library refernce to my project.
I'm using the following code:
Dim excelApp As New Excel.Application
Dim excelBook As Excel.Workbook = excelApp.Workbooks.Add
Dim excelWorksheet As Excel.Worksheet = _
CType(excelBook.Worksheets(1), Excel.Worksheet)
excelApp.Visible = true
Live fast, die young and leave a beautiful corpse behind.
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Office.exe
Additional information: Old format or invalid type library.
I've added the Microsoft Excel 9.0 Object library reference and the Microsoft Office 9.0 Object library refernce to my project.
I'm using the following code:
Dim excelApp As New Excel.Application
Dim excelBook As Excel.Workbook = excelApp.Workbooks.Add
Dim excelWorksheet As Excel.Worksheet = _
CType(excelBook.Worksheets(1), Excel.Worksheet)
excelApp.Visible = true
Live fast, die young and leave a beautiful corpse behind.