On Thu, 2013-10-24 at 16:34 +0300, Maxim Monastirsky wrote: > Hi Kohei, great that you responded! > > Could you also take a look at > https://bugs.freedesktop.org/show_bug.cgi?id=70100. There is a file which is > detected by Excel 2010 as 'Excel 2' sheet and LO also sets the excel4 filter, > but it fails in isExcel40 function from sc/source/ui/unoobj/exceldetect.cxx > because it has a value like in BIFF5.
The key here is that the bug report mentions that this xls file is generated by a third party software, which may write incorrect BOF ID for the files it generates. Ultimately the answer lies here: http://opengrok.libreoffice.org/xref/core/sc/source/filter/excel/read.cxx#145 Looks like our import filter code itself ignores this BOF ID and lumps 0x0809 toger with the ID's for BIFF2-4. If that's what the import filter does, then we should probably do the same in the file format detection code as well i.e. add 0x0809 to the list of "correct" BOF ID's for Excel 4.0 format or earlier. This shouldn't affect detection of more recent Excel file formats, since those formats use OLE to store workbook and other streams, and we use that to detect those versions, not the BOF ID's. As with the earlier bug you cited, this one should be an easy fix as well, and I believe you already have a fix for this? Kohei _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice