[Solved] Convert .ods file to csv

Discuss the spreadsheet application
Post Reply
CJenR
Posts: 4
Joined: Wed May 18, 2016 10:15 pm

[Solved] Convert .ods file to csv

Post by CJenR »

Hello!

Can someone help me to convert from .ods file to csv. I tried soffice --headless --convert-to csv filename.ods, but it is not working. It just opens the .ods file.
Last edited by Hagar Delest on Thu May 19, 2016 8:59 pm, edited 1 time in total.
Reason: tagged [Solved].
- CJ
OpenOffice 3.4.1. Calc on Linux
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Convert .ods file to csv

Post by acknak »

Greetings and welcome to the community forum!

The command line you quoted works for me with AOO 4.1.2. You may need to track down what "soffice" at the command line actually does. It could be a shell script that doesn't process the options as expected. If so, directly starting the soffice executable that comes with OO using the full path (that's what I did when it worked).

Also, are you still using OO 3.4.1? That's pretty old at this point. It might be worth at least trying the current version.
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert .ods file to csv

Post by Villeroy »

You've got to use LibreOffice rather than OpenOffice. The latter does not know any --convert-to option.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Convert .ods file to csv

Post by acknak »

Ouch. Villeroy is exactly right. I should take my own suggestion: the "soffice" I was using was actually starting LibO, not AOO.

Sorry, my bad.
AOO4/LO5 • Linux • Fedora 23
CJenR
Posts: 4
Joined: Wed May 18, 2016 10:15 pm

Re: Convert .ods file to csv

Post by CJenR »

Thank you for all the inputs!

Though soffice does not throw me any error, I believe as you said, it doesn't know --convert-to option. As of now I can not change openoffice version or to LibreOffice. Is there any other way to convert my ods file to csv in this AOO version?
- CJ
OpenOffice 3.4.1. Calc on Linux
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Convert .ods file to csv

Post by RoryOF »

What's wrong with /File /Save As : Text CSV (.csv) from the dropdown?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
CJenR
Posts: 4
Joined: Wed May 18, 2016 10:15 pm

Re: Convert .ods file to csv

Post by CJenR »

No.. My shell script has to do it. No manual intervention. So, Is there any other ways to do it? or any other suggestion.
- CJ
OpenOffice 3.4.1. Calc on Linux
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Convert .ods file to csv

Post by RoryOF »

CJenR wrote:No.. My shell script has to do it. No manual intervention. So, Is there any other ways to do it? or any other suggestion.
You didn't say that - you asked about "file" in the singular.
Macro at
viewtopic.php?f=45&t=19695
and another at
viewtopic.php?f=9&t=2551
and more at
viewtopic.php?f=9&t=75404

These may need some fine tuning because of changes in OO/LibO code, but as you wish to use a macro you are no doubt prepared to do that.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
CJenR
Posts: 4
Joined: Wed May 18, 2016 10:15 pm

Re: Convert .ods file to csv

Post by CJenR »

I went through the links though I was hoping for a simpler solution instead of using a Macro :)
I came across unoconv package which can be used to convert files. I installed it and It worked as a charm.

Anyway thank you for helping me! 8-)
- CJ
OpenOffice 3.4.1. Calc on Linux
Post Reply