How get a named range from an excel sheet using ExcelDataReader.Dataset

861 Views Asked by At

I am using the ExcelDataReader.Dataset package to read in .xlsx files and store specific sheets as a DataTable, like so:

public void SelectWorkbookClick(string s)
{
    string fileName = string.Format("{0}\\{1}", WorkbookFolder, Workbook);

    using (var stream = File.Open(fileName, FileMode.Open, FileAccess.Read))
    { 
        using (var reader = ExcelReaderFactory.CreateReader(stream))
        {
            FrontSheet = reader.AsDataSet().Tables[FrontSheetName];
            RearSheet = reader.AsDataSet().Tables[RearSheetName];
        }
    }
}

This works perfectly for reading in sheets, however my .xlsx file has named ranges in which I need to access.

I have had a look around and cannot not find any support for this, does anyone know of anyways I could go around this?

0

There are 0 best solutions below