Excel OLEDB - start row

Is there a way to specify a "start row" when using OLEDB to read an Excel file?  The code below works just fine if I have a header on line 1 and data starting on row 2.  However, my data will have miscellaneous information on lines 1 and 2, a header on line 3, and data starting on row 4.

Is there a way to indicate this in the Connection String?

Thanks,
Chris


    Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Data Source=C:\test.xls;Extended Properties=""Excel 8.0;"""

    Dim cn As New OleDbConnection(ConnectionString)
    cn.Open()

    Dim ds As New DataSet

    Using cmd As New OleDbCommand("SELECT * FROM [Sheet1$]", cn)
        Dim da As New OleDbDataAdapter(cmd)
        da.Fill(ds, "Sheet1")
    End Using
chladeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DhaestCommented:
I'm afraid you can't do that. The only thing (if I remember me correctly) is to tell if there is a header row or there is not. So you can't tell a connectionstring that a header-row is on line 3
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.