Retrieve sheet name

May 13, 2015 at 9:41 PM
Hello,
I am new using this cool utility and since I am reading heavy documents I cannot use the function "AsDataSet()".
How can I obtain the sheet name of the current sheet that I am looping through?
Excel.IExcelDataReader r;
            if (string.Compare(ext, ".xls") == 0) r = Excel.ExcelReaderFactory.CreateBinaryReader(file.InputStream, Excel.ReadOption.Loose);
            else r = Excel.ExcelReaderFactory.CreateOpenXmlReader(file.InputStream);

            do
            {
                // Some initialization stuff
             
                //Loop through data sheet
                while (r.Read())
                {
                   //Logic
                }
            } while (r.NextResult());
May 13, 2015 at 10:05 PM
I just found out there is a property called "Name" which is the sheetname of my current result.

Sorry for any inconvenience
Marked as answer by wakaguaka on 5/13/2015 at 3:05 PM