Home » excel » excel – Convert xlsx to text CSV via command line only on Linux

excel – Convert xlsx to text CSV via command line only on Linux

Posted by: admin April 10, 2020 Leave a comment

Questions:

Simple question:

Is it currently possible to invoke LibreOffice from a command line to open a *.xlsx and convert/save it as a *.csv?

Alternatively, if this is not possible what is the current best method for doing this via command line (needs to be invokable via script)?

Thanks,

How to&Answers:

Here is the command:

localc --headless  --convert-to csv:"Text - txt - csv (StarCalc)" *.xlsx

The above will save all converted files in current directory(directory from where you’ll run the command). All converted files will have their filename extensions changed to csv.

Alternative, method is the use of unoconv which i’ve not used.