批量将xls文件转换为csv [英] Batch convert xls-Files to 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.
这篇关于批量将xls文件转换为csv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!