用于读取 Microsoft Excel 文件的 Java 库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21351284/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java Library to read Microsoft Excel files
提问by OneMoreError
I want to write a program that compares two Microsoft Excel
sheets using Java.
我想编写一个Microsoft Excel
使用 Java比较两张纸的程序。
Is there any existing library (and its documentation) that can help me get started with basic stuffs like reading all the rows and columns of the excel ?
是否有任何现有的库(及其文档)可以帮助我开始使用基本的东西,比如阅读 excel 的所有行和列?
采纳答案by Martin Seeler
Have a look at Apache POI, which is a Java API for Microsoft Documents.
看看Apache POI,它是用于 Microsoft 文档的 Java API。
And here is a tutorialon how to setup and get started with Excel files.
而这里是一个教程上如何设置和使用Excel文件上手。
回答by Sureshkumar Saroj
1. Apache POI
1. 阿帕奇兴趣点
Apache POI, a project run by the Apache Software Foundation, and previously a sub-project of the Jakarta Project, provides pure Java libraries for reading and writing files in Microsoft Office formats, such as Word, PowerPoint and Excel.
Apache POI 是 Apache Software Foundation 运行的一个项目,之前是 Jakarta Project 的一个子项目,它提供纯 Java 库,用于读取和写入 Microsoft Office 格式的文件,例如 Word、PowerPoint 和 Excel。
2. docx4j
2. docx4j
docx4j is a Java library for creating and manipulating Microsoft Open XML (Word docx, Powerpoint pptx, and Excel xlsx) files.
docx4j 是一个 Java 库,用于创建和操作 Microsoft Open XML(Word docx、Powerpoint pptx 和 Excel xlsx)文件。