Im trying to open an Excel workbook and read in the data. It works but it is really slow.
This line is taking all the time
This is the full code
oExcel is defined as
My guess is that it is to do with late binding. Has anyone had this problem
Thanks for any help.
This line is taking all the time
Code:
myRange = myWorksheet.Cells(IntRow, IntColumn)
This is the full code
Code:
Public Sub New(ByVal oExcel As WorkBookSelection.ExcelWorkBook)
Dim myWorksheet As Excel.Worksheet = oExcel.WorkSheets(oExcel.LookUpSheet)
Dim IntRow As Integer = 2
Dim myRange As Excel.Range
Dim IntColumn As Integer
Do Until myWorksheet.Cells(IntRow, 1).Value = ""
For IntColumn = 1 To LookUpColumn.MaxColumn
myRange = myWorksheet.Cells(IntRow, IntColumn)
Next
IntRow = IntRow + 1
Loop
End Sub
oExcel is defined as
Code:
oExcel = GetObject(, "Excel.Application")
My guess is that it is to do with late binding. Has anyone had this problem
Thanks for any help.
Last edited by a moderator: