Is it possible convert .csv files to .ods files using command line? I have a lot archives to convert and I don't want convert them one by one.


I used the LibreOffice commandline to convert a sample csv file:

soffice --convert-to ods koko.csv --headless

So to use it in a batch command would be

for i in "$1"/*; do soffice --convert-to ods "$i" --headless; done

Usage: ./converter.sh /path/to/folder

  • According to soffice --help, --convert-to implies --headless, so you don't need to explicitly specify it
    – MestreLion
    Jul 27 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.