Ask Your Question
0

Convert to CSV via command-line with all text-fields quoted

asked 2015-04-29 11:37:17 +0200

lovam gravatar image

updated 2015-05-06 10:24:58 +0200

How do I convert a .ODS file into .CSV via command-line and have all text-fields quoted?

I know how to convert via CLI using LibreOffice:

"C:\Program Files (x86)\LibreOffice 4\program\scalc.exe" --headless -convert-to csv:"Text - txt - csv (StarCalc)":59,34,76 -outdir converted MySpreadsheet.ods

or unoconv:

"C:\Program Files (x86)\LibreOffice 4\program\python.exe" ..\..\tools\unoconv\unoconv -f csv -e FilterOptions=59,34,76 -o converted MySpreadsheet.ods

The OpenOffice wiki article on FilterOptions only mentions the first four options and formatting options for each column. The Unoconv Manpage mentions "Text export filter options" as opposed to "CSV export filter options" but I have no idea how to specify them. The text-fields are formatted as text in the .ODS file.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-05-06 10:27:05 +0200

lovam gravatar image

I don't know what the logic behind this is but the 7th parameter controls the "Quote all text cells" options.

"C:\Program Files (x86)\LibreOffice 4\program\scalc.exe" --headless -convert-to csv:"Text - txt - csv (StarCalc)":59,34,76,,,,true -outdir converted MySpreadsheet.ods
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-04-29 11:37:17 +0200

Seen: 2,531 times

Last updated: May 06 '15