Convert xlsx to csv in Linux with command line

后端 未结 10 1336
心在旅途
心在旅途 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 00:53

    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, sep="\t")
    ' | Rscript --vanilla - $1 2>/dev/null
    }
    
    xlsx2txt file.xlsx > file.txt
    

提交回复
热议问题