• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

批量xls文件转换为csv

用户头像
it1352
帮助1

问题说明

我需要将100多个Excel文件转换为CSV。更糟糕的是,这些文件包含多个工作表,而我只需要其中一个。

I need to convert over 100 Excel files to CSV. Worse these files consist of multiple sheets and I only need one of them.

起初,我偶然发现了Perl程序xls2csv。幸运的是,我什至在 XLS文件转换的底部找到了一个方便的脚本,它将所有工作表都转换为单独的csv文件。但不幸的是,此转换器已损坏并跳过了行。

At first I stumbled upon the Perl program xls2csv. Luckily I even found on XLS file conversion at the bottom a convenient script that converts all sheets into seperate csv files. But unluckily this converter is broken and skips lines.

我还尝试了 pyodconverter ,但这只会转换第一张纸。

I also tried pyodconverter but that only converts the first sheet.

有什么建议吗?如果必须在Windows上完成转换,那是可以的,尽管我真的更喜欢Linux。而且如果必须是Windows,则不需要安装Excel也很好。

Any suggestions? It would be ok if that conversion had to be done on Windows though I would really prefer Linux. And if it has to be Windows it would be nice if it wouldn't need an Excel installation.

正确答案

#1

有一个非常有用的功能位于 http://poi.apache.org/

There's a very useful java library called Apache POI at http://poi.apache.org/

以下链接提供了将xls转换为csv的示例应用程序。

The following link provides an example application that converts xls to csv.

http://svn.apache.org/repos/asf/ poi / trunk / src / examples / src / org / apache / poi / hssf / eventusermodel / examples / XLS2CSVmra.java

如果您知道Java,就可以根据您的需要进行调整。由于它是Java,因此它也可以在linux上运行。

If you know java you can adjust it to your needs. Since it's java it runs also on linux.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfeick
系列文章
更多 icon
同类精品
更多 icon
继续加载