批量xls文件转换为csv
问题说明
我需要将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.
正确答案
有一个非常有用的功能位于 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.
如果您知道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
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
检查邮件是否发送成功
it1352 07-25 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
Android微调工具-删除当前选择
it1352 06-20 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20 -
希伯来语的空格句子标记化错误
it1352 06-22