Sorry I should have been more descriptive in what I'm doing.
I'm feeding XlsReader (defined as reader) with the path to a file that
I'm then searching for a particular record on a particular date, with
unique records on each row and dates across in columns.
eg. I am searching for record 'def' on the '3/1/2009', which returns
me the value 5.
Record 1/1/2009 2/1/2009 3/1/2009
abc 1 1.5 2.1
def 3 4 5
ghi 2 4.1 10
I have this working successfully by storing the headers in an array
using reader.Headers, which I use it to find the correct column. I
then use reader.ReadRecord() to loop through each row until I find the
datapoint in the first column, which then gives me the row number. To
get the value I then use reader.Item(row#, column#) to give me the
value I'm looking for.
Everything works 100% fine, except a number of the files I need to
import have one or more rows above the 'header row'. In my development
I've just removed the rows manually to get it working, however in
practise I want the user to specify on which row the headers reside.
Any ideas?
It would be great if you could set a parameter such as reader.HeaderRow
(row#), and then the reader would just pick up the data from the rows
below it.
Thanks!
bellsy