I have a set of XLS files which I want to convert to .CSV retaining the original base name. I found that this code worked best:
unoconv -f csv *.xls
also there are other ways in this link converting xls to csv but I wanted to retain the same name.
After a while it showed me this error
Failed to connect to /usr/lib/libreoffice/program/soffice.bin (pid=7779) in 6 seconds.
Connector : couldn't connect to socket (Success)
Error: Unable to connect or start own listener. Aborting.
I have tried reinstalling but it does not work. I would like any help where I can retain the name of the xls file and convert it to csv. I am using this code in an R environment and accessing the system terminal.
Best Answer
I would start by closing LibreOffice. That has caused issues for me in the past with
unoconv
but it has been hard to predict. It's easiest to just letunoconv
launch its own processing server. If you think you've done that but you're seeing the same error, runkillall soffice.bin
and try again.In terms of retaining the same name, it does that by default.
That will create a
filename.csv
file. In my mind, this is really desirable because then you know the format of the file (and you won't try to do silly things by accident). And that works for wildcards too:So you just need to get it up and running and it'll do what you want.