Convert xlsx to csv in linux command line



The Gnumeric spreadsheet application comes with a commandline utility called ssconvert that can convert between a variety of spreadsheet formats on the commandline:

1. Start by installing Gnumeric.

sudo apt-get install gnumeric -y

(For centos / fedora : http://www.linuxquestions.org/questions/linux-software-2/how-to-install-gnumeric-on-centos-6-x-x86_64-and-remain-sane-922790/)

UPDATE : (For OSX install Homebrew then run brew install gnumeric)

2. Run ssconvert

ssconvert file1.xlsx file2.csv

3. To avoid error messages

ssconvert file1.xlsx file2.csv /dev/null 2>&1

4. Check your new converted file

cat file2.csv

5. For a batch of files

for file in *; do ssconvert "${file}" "${file}".csv > /dev/null 2>&1; done



Users feedback ( 1 )

Any thoughts?

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Loading more content...