[Seek Help] 如何批量修改xls格式为csv格式
Tofloor
poster avatar
177******59
deepin
2021-09-14 19:36
Author

有一批测序数据,几十个*.xls格式大文件,每个都几百兆,如何批量修改*csv格式。 

或者使用Rstudio如何打开*.xls格式的文件? 我在网上搜了一些方法,都不可行。

Reply Favorite View the author
All Replies
孤岛悬城
deepin
2021-09-14 20:24
#1
It has been deleted!
铁山老道孔乙己
deepin
2021-09-14 21:06
#2

你可以尝试下在命令行使用 libreoffice 进行转换

libreoffice  --convert-to 

具体参考 libreoffice --help 。我贴出来部分提示:

   --convert-to OutputFileExtension[:OutputFilterName] \                      

     [--outdir output_dir] [--convert-images-to]                               

                       Batch convert files (implies --headless). If --outdir   

                       isn't specified, then current working directory is used 

                       as output_dir. If --convert-images-to is given, its     

                       parameter is taken as the target filter format for *all*

                       images written to the output format. If --convert-to is 

                       used more than once, the last value of                  

                       OutputFileExtension[:OutputFilterName] is effective. If 

                       --outdir is used more than once, only its last value is 

                       effective. For example:                                 

                   --convert-to pdf *.odt                                      

                   --convert-to epub *.doc                                     

                   --convert-to pdf:writer_pdf_Export --outdir /home/user *.doc

                   --convert-to "html:XHTML Writer File:UTF8" \             

                                --convert-images-to "jpg" *.doc              

                   --convert-to "txt:Text (encoded):UTF8" *.doc              

 

Reply View the author
enforcee
deepin
2021-09-15 05:06
#3

接楼上,你只要在终端输入

libreoffice --convert-to csv 文件.xls

然后在主目录就能找到了

如果想指定输出目录可以后面加--outdir 目录

快速输入文件名就从文件管理器把文件图标直接拖拽到终端里面去

多个文件就

libreoffice --convert-to csv 文件1.xls csv 文件2.xls csv 文件3.xls ...

还嫌麻烦就把所有文件放到一个文件夹

libreoffice --convert-to csv 文件夹/*.xls

注意通配符*不要在引号里面用

Reply View the author
177******59
deepin
2021-09-15 19:40
#4

谢谢,命令很好用啊!

Reply View the author