I am working with the Spreadsheet below. Spreadsheet
FileStream fs = File.Open(dialog.FileName, FileMode.Open, FileAccess.Read);
using (IExcelDataReader reader = ExcelReaderFactory.CreateReader(fs))
{
var data = reader.AsDataSet(new ExcelDataSetConfiguration() {
FilterSheet = (tableReader, sheetIndex) =>
{
return !tableReader.Name.StartsWith("Sheet");
},
ConfigureDataTable = (tableReader) => new ExcelDataTableConfiguration()
{
UseHeaderRow = false,
}
});
I am trying to use the row in blue as the column headers. So basically skipping the rows above the blue row. How can i achieve this dynamically without saying rowReader.Read() 14 times.