Convert xlsx to csv in Linux with command line

后端 未结 10 1326
心在旅途
心在旅途 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条回答
  •  醉话见心
    2020-11-28 01:02

    As others said, libreoffice can convert xls files to csv. The problem for me was the sheet selection.

    This libreoffice Python script does a fine job at converting a single sheet to CSV.

    Usage is:

    ./libreconverter.py File.xls:"Sheet Name" output.csv
    

    The only downside (on my end) is that --headless doesn't seem to work. I have a LO window that shows up for a second and then quits.
    That's OK with me, it's the only tool that does the job rapidly.

提交回复
热议问题