0

I'm using ExcelDataReader to read XLS files and it's working fine but I don't know how to read Defined Names.

I am able to read file contents into a DataSet:

var excelDataSet = reader.AsDataSet(new ExcelDataSetConfiguration 
{
    ConfigureDataTable = (_) => new ExcelDataTableConfiguration { UseHeaderRow = true }
});

I then take the first table from the contents:

DataTable? table = excelDataSet.Tables["MyTable"];

And I can then loop through rows and columns with

string cellValue = table.Rows[rowNumber][colNumber].ToString();

But this doesn't give me values from the so-called Defined Names (Named Ranges). How to read those?

Val
  • 1,548
  • 1
  • 20
  • 36

1 Answers1

0

It's currently not supported in ExcelDataReader - See previous stack overflow question: How get a named range from an excel sheet using ExcelDataReader.Dataset

YungDeiza
  • 3,128
  • 1
  • 7
  • 32