Convert xlsx to csv in Linux with command line

后端 未结 10 1310
心在旅途
心在旅途 2020-11-28 00:36

I\'m looking for a way to convert xlsx files to csv files on Linux.

I do not want to use PHP/Perl or anything like that since I\'m looking at processing several mill

10条回答
  •  萌比男神i
    2020-11-28 00:50

    In bash, I used this libreoffice command to convert all my xlsx files in the current directory:

    for i   in *.xlsx; do  libreoffice --headless --convert-to csv "$i" ; done
    

    It takes care of spaces in the filename.

    Tried again some years later, and it didn't work. This thread gives some tips, but the quickiest solution was to run as root (or running a sudo libreoffice). Not elegant, but quick.

    Use the command scalc.exe in Windows

提交回复
热议问题