mattlm.com

Conversion to CSV using LibreOffice in a MacOS terminal

Assuming LibreOffice is installed to Applications, the following command can be used to easily convert many files to CSV format:

/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to csv ./*.xlsx

This assumes the terminal is already in the directory with the files to be converted, in this case a bunch of .xlsx files.
The original files are left untouched.

source