I am using ExcelDataReader to read data from my Excel workbook in C#.
But structure of my Excel sheet is such that data to be read can start from any particular cell and not necessarily A1.
Can any one Please suggest a way on how this can be achieved using ExcelDataReader?
If you are using
ExcelDataReader 3+you will find that there isn't any method forAsDataSet()for your reader object, You need to also install another package forExcelDataReader.DataSet, then you can use theAsDataSet()method.Also there is not a property for
IsFirstRowAsColumnNamesinstead you need to set it inside ofExcelDataSetConfiguration.Example:
You can find row number and column number of a cell reference like this:
Now you can use some loops to read data from that cell like this:
Update:
You can filter rows and columns of your Excel sheet at read time with this config: