I have a problem with a very particular case:
I am working with Reporting Services. When I export a report to Excel and try to read it with ExcelBinaryReader.Read(), the method throws the following exception:
System.InvalidCastException: Unable to cast object of type 'Excel.Core.BinaryFormat.XlsBiffRecord' to type 'Excel.Core.BinaryFormat.XlsBiffDbCell'.
Excel.ExcelBinaryReader.findFirstDataCellOffset(Int32 startOffset) : line 104
Excel.ExcelBinaryReader.initializeSheetRead() : line 499
Excel.ExcelBinaryReader.Read() : line 667
If I open the excel with Microsoft Excel and save it without making any changes then ExcelBinaryReader.Read() works.
Any help or idea is welcome.