I need sheet name

May 31, 2012 at 9:33 AM
I tried this component it fits my requirement very well. I want to get all the sheet name in excel sheet read using this component. Do you have any idea? Thanks in advance.
Apr 8, 2013 at 2:50 PM
Use DataSet to achieve this.
using(IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream)) {
    DataSet result = excelReader.AsDataSet();
    foreach (DataTable item in result.Tables)
    {  
        <p>@item.TableName</p>
    }
}