In coverting my VB6 code to .NET I get an run time error when declaring a new Excel.Workbook:
Dim oExcel As New Excel.Application
Dim oWorkbook As New Excel.Workbook <- error is here
Dim oWorksheet As New Excel.Worksheet
oWorkbook = oExcel.Workbooks.Open(FullPath)
Heres the error: An unhandled exception of type System.Runtime.InteropServices.COMException occurred in app.exe
Additional information: COM object with CLSID {00020819-0000-0000-C000-000000000046} is either not valid or not registered.
However, I have verified that the Microsoft Excel 10.0 Object Library is registered (I am using Excel 2002).
Any help would be greatly appreciated!
Dim oExcel As New Excel.Application
Dim oWorkbook As New Excel.Workbook <- error is here
Dim oWorksheet As New Excel.Worksheet
oWorkbook = oExcel.Workbooks.Open(FullPath)
Heres the error: An unhandled exception of type System.Runtime.InteropServices.COMException occurred in app.exe
Additional information: COM object with CLSID {00020819-0000-0000-C000-000000000046} is either not valid or not registered.
However, I have verified that the Microsoft Excel 10.0 Object Library is registered (I am using Excel 2002).
Any help would be greatly appreciated!