First time here? Check out the FAQ!
Hello,
I'm using LibreOffice 3.4 on Fedora 16. I want to batch convert lots of .xls/x, .doc/x, and .ppt/x files to plain text.
When I issue the following command to just try to convert a single file, the command fails silently with an exit code of 1.
$ soffice.bin --headless --convert-to txt foo.xls
$ echo $?
1
$
I'd also like to know how to efficiently convert a whole bunch of these files without starting and stopping LibreOffice everytime. It appears that the --accept argument may be the way, but there seems to be no example of this anywhere. Would greatly appreciate if you could share one.
Many thanks in advance, /HS
Bug 44496 - convert-to pdf:writer_pdf_Export (headless) fails when LibreOffice already open
Close down all LO instances and it works (tested)
Can't speak to the batch capabilities off hand, but as your looking for a command line tool, the first thing that comes to mind is AntiWord. It supports Word files up to MS Office 2003. Unfortunately, if it's not in your repos the RPM links on that page are all out of date (latest version is 0.37 from 2005). I had to build it from source myself recently. I've always found it to work quite well, but I only use it in combination with less for older *.doc files.
Anyway, I hope I've given you a step forward and not fed you a red herring.
LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!
Asked: 2012-02-24 07:10:58 +0200
Seen: 1,731 times
Last updated: Sep 04 '12
Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.