When im trying to execute the folowing code i get an error, i dont know how to get ride of it, help is needed
Im trying to execute the folowing code :
Private xlsApp As Excel.Application
Private xlsBook As Excel.Workbook
Private xlsSheet As Excel.Sheets
Sub New(ByVal file As String)
If file.EndsWith(".xls") Then
xlsApp = GetObject(, "Excel.Application")
If xlsApp Is Nothing Then
xlsApp = CreateObject("Excel.Application")
End If
xlsBook = xlsApp.Workbooks.Add
xlsApp.Visible = True
End If
End Sub
I get the folowing error:
Unhandled Exception: System.Runtime.InteropServices.COMException (0x80028018): Oude indeling of ongeldig type DLL-bestand.
(translation: old lay-out or invallid type DLL-file.)
at Excel.Workbooks.Add(Object Template)
Im using Microsoft Excel 10.0 Object Library
I also tryed xlsApp.Workbooks.Open(file) resulting in the same error. Any sugesstions?
Im trying to execute the folowing code :
Private xlsApp As Excel.Application
Private xlsBook As Excel.Workbook
Private xlsSheet As Excel.Sheets
Sub New(ByVal file As String)
If file.EndsWith(".xls") Then
xlsApp = GetObject(, "Excel.Application")
If xlsApp Is Nothing Then
xlsApp = CreateObject("Excel.Application")
End If
xlsBook = xlsApp.Workbooks.Add
xlsApp.Visible = True
End If
End Sub
I get the folowing error:
Unhandled Exception: System.Runtime.InteropServices.COMException (0x80028018): Oude indeling of ongeldig type DLL-bestand.
(translation: old lay-out or invallid type DLL-file.)
at Excel.Workbooks.Add(Object Template)
Im using Microsoft Excel 10.0 Object Library
I also tryed xlsApp.Workbooks.Open(file) resulting in the same error. Any sugesstions?