linuxer
linuxer

Reputation: 161

Libreoffice: convert csv to ods and viceversa via shell

This is my problem. A ".csv" file where delimiter is tab and content is a "Little-endian UTF-16 Unicode text". If i try to open it with gui in libreoffice there are my successfully

enter image description here

if i'm trying via shell with

unoconv -f ods -e FilterOptions="9,34,UNICODE,1" [FILE]

the result is a file with no separation. What's wrong?

And what's is the best shell command in order to convert this ods to file to a well generated csv (Unicode UTF8, comma separated, ecc.)?

Upvotes: 2

Views: 4720

Answers (1)

linuxer
linuxer

Reputation: 161

this is my definitive solution

iconv -f UTF-16 -t UTF-8 /original/folder/file.csv > /tmp/file.csv
unoconv -f ods -i FilterOptions="9,34,UNICODE,1" /tmp/file.csv
unoconv -f csv -o /original/folder/file.csv -i FilterOptions="9,34,UNICODE,1" /tmp/file.ods

Upvotes: 3

Related Questions