Is there a way to read data table with ExcelDataReader using the Excel range (such as A1:B9)?
I am looking for something like:
string tableName = "MyTable";
string range = "A2:B9";
using (var stream = File.Open(@"d:\temp\lte80k.xlsx", FileMode.Open, FileAccess.Read))
{
using (var excelDataReader = ExcelReaderFactory.CreateReader(stream))
{
var filteredTable = excelDataReader.GetTable(tableName, range);
// some processing here...
}
}
I can see that there is a class ExcelDataReader.CellRange
, but cannot figure out how to use it.