I have a formated Excel file, over which I do not have control, and I need to read the information contained in it.
The problem with the file is that the first few rows contain formated information and I can not modify that file nor I can not ask for a format change.
Is it possible then, to read such a file through ADO.Net?
Thanks in advance,
I think this article explains how to do this pretty well:
As for the lack of a header row…
With Excel workbooks, the first row in
a range is the header row (or field
names) by default. If the first range
does not contain headers, you can
specify HDR=NO in the extended
properties in your connection string.
If you specify HDR=NO in the
connection string, the Jet OLE DB
provider automatically names the
fields for you (F1 represents the
first field, F2 represents the second
field, and so on).