I am trying to use Libreoffice to convert a HTML file to XLS or XLSX format.
With LibreOffice 4.0.4.2 running on CentOS release 6.5 (Final) I was able to convert simple html to Microsoft XLS with the following command.
soffice --headless --convert-to xls my_file.html
I've been testing on the latest LibreOffice 5.0.4.2 without success. I'm using the following command and including the filter:
libreoffice5.0 --headless --convert-to xls:"MS Excel 97" test.html
It returns the following.
convert /path/to/test.html -> /path/to/test.xls using filter : MS Excel 97 Overwriting: /path/to/test.xls Error: Please verify input parameters... (SfxBaseModel::impl_store failed: 0xc10)
I haven't had any success in deciphering the error. Any tips appreciated on using libreoffice (recent versions) to convert from HTML to XLS/XLSX appreciated ... as well as other opensource tools that can accomplish the same task.
No sooner do I post the question than I solve my problem.
The answer, to save you the trouble in the future...
libreoffice5.0 --headless --calc --convert-to xls:"MS Excel 97" test.html
Or more simply:
scalc --headless --convert-to xlsx test.html
Works perfectly and is relatively intuitive!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With