Excel oledb - More than one header row

  • Thread starter Thread starter Masa Ito
  • Start date Start date
M

Masa Ito

I have been using OLEDB to pull excel tables into a dataset in dotnet.
Problem is, I have new tables coming at me that have an extra row. I am
hoping there is some way to tell Excel that the header row is in row 2, and
that the data starts in row 3.

I was thinking of trying to create a Named Range first, then read the named
range, but I dont' know how many rows there will be...

Masa
 
¤ I have been using OLEDB to pull excel tables into a dataset in dotnet.
¤ Problem is, I have new tables coming at me that have an extra row. I am
¤ hoping there is some way to tell Excel that the header row is in row 2, and
¤ that the data starts in row 3.
¤
¤ I was thinking of trying to create a Named Range first, then read the named
¤ range, but I dont' know how many rows there will be...

I'm not aware of any method of telling the Excel driver which row to start with. You could set the
HDR argument to No and then just skip the blank row and header row. Field names will be F1, F2, etc.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top