I use libreoffice to convert .xlsb (new Excel binary format) files to .xls (old Excel format) in order to parse them with other code that expects .xls. The following command line usually works:
libreoffice --headless --invisible --convert-to xls f.xlsb
This writes an output file f.xls
. I have used this successfully for some time (driven from code, so it is not that I have just forgotten the right command line).
But now I find that the command appears to work, but the file f.xls
is not Excel format at all, but an OpenDocument spreadsheet (LibreOffice's native format). Something is causing the program to ignore the specified destination format.
This is on Fedora 20 using the Fedora-supplied libreoffice package. What could have changed to break it?
It breaks if the libreoffice-xsltfilter
package is installed. I had installed that as part of dependencies for something else. You can tell whether the conversion is working properly by a difference in the message printed. If it is converting to xls correctly, you see
convert /dir/f.xlsb -> /dir/f.xls using MS Excel 97
But if conversion is broken, you see the message
convert /dir/f.xlsb -> /dir/f.xls using
and the output is in OpenDocument format instead of Excel format.