header not in first row

K

Kim Carlsen

Hi

How do I do a select from an excel file, where the headers is not in the
first row?
The first and second row contains some date and logo, so I want to start at
third row in my select.
is there some way to skip the two rows when reading?
the code looks like this:

String strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=c:\test.xlsx;Extended Properties=Excel 12.0;";
String strSelect = "SELECT [text] FROM [sheetname$]";
OleDbDataAdapter daMaster = new OleDbDataAdapter(strSelect, strConn);

Regards
Kim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top