Answer by kaiya for Convert xlsx to csv in Linux with command line
You can use script getsheets.py. Add dependencies first:pip3 install pandas xlrd openpyxlThen call the script: python3 getsheets.py <file.xlsx>
View ArticleAnswer by Udesh for Convert xlsx to csv in Linux with command line
You can use executable libreoffice to convert your .xlsx files to csv:libreoffice --headless --convert-to csv ABC.xlsxArgument --headless indicates that we don't need GUI.
View ArticleAnswer by Benoit Duffez for Convert xlsx to csv in Linux with command line
As others said, executable libreoffice can convert Excel files (.xls) files to CSV. The problem for me was the sheet selection.This LibreOffice Python script does a fine job at converting a single...
View ArticleAnswer by Pascal-Louis Perez for Convert xlsx to csv in Linux with command line
Using the Gnumeric spreadsheet application which comes which a commandline utility called ssconvert is indeed super simple:find . -name '*.xlsx' -exec ssconvert -T Gnumeric_stf:stf_csv {} \;and you're...
View ArticleAnswer by Akavall for Convert xlsx to csv in Linux with command line
If the .xlsx file has many sheets, the -s flag can be used to get the sheet you want. For example:xlsx2csv "my_file.xlsx" -s 2 second_sheet.csvsecond_sheet.csv would contain the data of the second...
View ArticleAnswer by Holger Brandl for Convert xlsx to csv in Linux with command line
Use csvkit:in2csv data.xlsx > data.csvFor details, check their excellent documentation.
View ArticleAnswer by Holger Brandl for Convert xlsx to csv in Linux with command line
Another option would be to use R via a small Bash wrapper for convenience:xlsx2txt(){echo 'require(xlsx)write.table(read.xlsx2(commandArgs(TRUE)[1], 1), stdout(), quote=F, row.names=FALSE, col.names=T,...
View ArticleAnswer by andrewtweber for Convert xlsx to csv in Linux with command line
If you already have a desktop environment then I'm sure Gnumeric or LibreOffice would work well, but on a headless server (e.g. any cloud-based environment), they require dozens of dependencies that...
View ArticleAnswer by neves for Convert xlsx to csv in Linux with command line
In Bash, I used this LibreOffice command (executable libreoffice) to convert all my .xlsx files in the current directory:for i in *.xlsx; do libreoffice --headless --convert-to csv "$i" ; doneClose all...
View ArticleAnswer by spiffytech for Convert xlsx to csv in Linux with command line
You can do this with LibreOffice:libreoffice --headless --convert-to csv $filename --outdir $outdirFor reasons not clear to me, you might need to run this with sudo. You can make LibreOffice work with...
View ArticleAnswer by jmcnamara for Convert xlsx to csv in Linux with command line
The Gnumeric spreadsheet application comes with a command line utility called ssconvert that can convert between a variety of spreadsheet formats:$ ssconvert Book1.xlsx newfile.csvUsing exporter...
View ArticleAnswer by Pavel Veller for Convert xlsx to csv in Linux with command line
If you are OK to run Java command line then you can do it with Apache POI HSSF's Excel Extractor. It has a main method that says to be the command line extractor. This one seems to just dump everything...
View ArticleConvert xlsx to csv in Linux with command line
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 millions of lines, so I need something...
View Article