Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to convert a bunch of xlsx files to xls (because some other software<cough>matlab<cough> can process xls but not xlsx on the mac).

I've tried unoconv but it has issues (which apparently stem from pyuno's shared object not being 64-bit-compatible -- even trying to override this with


still dies, this time with Fatal Python error: Interpreter not initialized (version mismatch?) which I'm surmising has to do with a mismatch between the python used with OpenOffice and the one shipped with MacOS X).

I'm using the Microsoft-provided "Open XML Converter" in the meantime, but I'd really like to figure out a way to do it with FOSS tools and via the shell. Any ideas?

Oh, I'm running on Snow Leopard if that makes any difference.

share|improve this question
up vote 2 down vote accepted

I've not tried this with .xls(x) files per say, but I have used LibreOffice to batch convert .doc(x) files to .pdf using the convert-to option. OpenOffice has the same options, afaik.

Check the help option for your app. In my case it was:

/Applications/ -help

In particular, for my switch to .pdf files, I did something like this:

/Applications/ -headless -convert-to pdf:writer_pdf_Export *.doc

The -headless flag just prevents the whole GUI from loading. There is likely a similar output file extension and filter (the pdf:writer_pdf_Export) for your .xls(x) case.

share|improve this answer
OK, thanks-- OpenOffice 3.3 doesn't have seem to have the -convert-to (and -headless claims to be recognized, but still causes the GUI to fire up). LibreOffice does the trick (though it still seems to be spending time firing up a bunch of stuff in the background). I used this command line: $ /Applications/ --headless --convert-to xls 'test 1873.xlsx' – jhfrontz Jan 30 '12 at 19:46
The LibreOffice icon will show up in the dock, but I don't' get it loading a bunch of stuff. Also, for my install, the options aren't long options - they only have one - character, not two. That is interesting about OpenOffice not having these options. There is probably a way to define a macro in OO and then call that macro from the command line, but I'm unsure. – cm2 Jan 30 '12 at 20:47
I get it loading stuff (lots of disk spinning and time elapsed) and actually switching visual focus to the space (virtual desktop) where I have OO pinned -- not intolerable, but not what I would have hoped for "headless". Oh, this is on LibreOffice 3.4.5 OOO340m1(Build:502) – jhfrontz Jan 31 '12 at 21:29
Interesting. I'm using LibreOffice 3.3 330m19(Build:401). Not sure what has changed, but at least it is working for you now :). – cm2 Feb 1 '12 at 17:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.