3

What is a way to convert a batch of .xlsx files to .xls format? I would prefer it to be a command-line solution, but anything is better than opening each manually, and manually saving in the new format.

~~Edit~~

So is there a way to get around that error?

errored: Leaking python objects bridged to UNO for reason pyuno runtime is not initialized, 
(the pyuno.bootstrap needs to be called before using any uno classes) 
python: tpp.c:63: __pthread_tpp_change_priority: 
Assertion `new_prio == -1 || (new_prio >= __sched_fifo_min_prio && new_prio <= __sched_fifo_max_prio)' failed. 
Aborted
David Oneill
  • 12,614

3 Answers3

2

You can use unoconv:

sudo apt-get install unoconv
ls *.xlsx | xargs unoconv -f xls

You may need to start "unoconv -l" on a differente terminal to provide the OO listener service.

João Pinto
  • 17,323
1

You can use ssconvert:

ssconvert --export-type=Gnumeric_Excel:excel_dsf "/path/uno.xlsx" "/path/dos.xls"
Tony
  • 111
0

Probably you can use xlsx2csv. Put the files in a directory and then:

sudo easy_install xlsx2csv

xlsx2csv.py /path/to/input/dir

See also https://stackoverflow.com/q/5256733/

toby544
  • 101