Hi,
I am trying to read rows from an excel sheet it is not starting from the first row, so I have to a copy the first row a paste it in the second row so it will start from row 2, how can i make it to start from the first row?
------code
filen = InputBox("Enter the xls file name")
sheetname = InputBox("Enter the Sheet name") & "$"
Set CONN = New ADODB.Connection
Set RS = New ADODB.Recordset
CONN.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & filen & ";" & _
"Extended Properties=""Excel 8.0;HDR=YES"""
With RS
.Open "SELECT * FROM [" & sheetname & "]", CONN, adOpenDynamic, adLockOptimistic
.MoveFirst
End With
Do Until RS.EOF
bla bla
loop
.Movenext
Regards
time is the father of truth
I am trying to read rows from an excel sheet it is not starting from the first row, so I have to a copy the first row a paste it in the second row so it will start from row 2, how can i make it to start from the first row?
------code
filen = InputBox("Enter the xls file name")
sheetname = InputBox("Enter the Sheet name") & "$"
Set CONN = New ADODB.Connection
Set RS = New ADODB.Recordset
CONN.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & filen & ";" & _
"Extended Properties=""Excel 8.0;HDR=YES"""
With RS
.Open "SELECT * FROM [" & sheetname & "]", CONN, adOpenDynamic, adLockOptimistic
.MoveFirst
End With
Do Until RS.EOF
bla bla
loop
.Movenext
Regards
time is the father of truth