Error reading binary (.xls) file

Jan 28, 2013 at 8:20 PM

Trying to read a .xls file and I get this --> Error: Neither stream 'Workbook' nor 'Book' was found in file.

Stepping though the code while it was reading the file confirms the error message is technically right. There is a 'WORKBOOK' entry though.

At the bottom of the XlsRootDirectory.cs file, is a method FindEntry that does the finding. I just changed it to be case insensitive and it read the file ok.

From this: if (e.EntryName == EntryName)

To this: if (string.Compare(e.EntryName, EntryName, true) == 0)


Jan 29, 2013 at 7:46 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 29, 2013 at 7:46 AM

Excellent, thanks for spotting that. I've put a note in to include it and add it as a unit test.