Data from different tabs coming out together during a single read

Nov 9, 2011 at 2:33 PM

The following code outputs data from multiple tabs 

var reader = Excel.ExcelReaderFactory.CreateOpenXmlReader(uploadFile.InputStream);
while (reader.Read())
    System.Diagnostics.Debug.WriteLine(reader.FieldCount );
    for (int i = 0; i < reader.FieldCount; i++)
        System.Diagnostics.Debug.Write(reader[i] + "*");

On a single line, I can get data from 3 or more tabs.

I would expect this to loop through and show all of the contents of the first tab and only the first tab.

What am I missing?


Nov 9, 2011 at 2:52 PM

It seems that the above code works as expected if there is only a single tab.


Has anyone else used this library to parse files with more than one tab?