Quantcast
Channel: Excel Data Reader - Read Excel files in .NET
Viewing all articles
Browse latest Browse all 448

New Post: Retrieve sheet name

$
0
0
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());

Viewing all articles
Browse latest Browse all 448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>