1. Comparison of Java Excel reading methods
There are two typical methods to read and write MS Excel files in Java:
L Java-to-com method:
(1) jcom
(2) Jacob
L direct reading and writing of Excel files
(3) jexcel
(4) poi
In method 1, Java-com bridge is used to read and write Excel files. It must be supported by COM components in the background and cannot be used without windows.
Method 2 is to directly use Java API to access Excel files and read and write Excel files directly from disk files or JAVA input and output streams. In contrast, method 2 is more direct and does not depend on Windows platforms and COM components. Jexcel and poi are both open-source Java projects, and jexcel is an open-source project of SourceForge (Http://jexcelapi.sourceforge.net/Poi is an open-source Apache Project (Http://jakarta.apache.org/poi/). Jexcel is now available in the latest version 2.5.9, which was released in December 22, 2005. The latest version of poi is 3.0 alpha.
2. Introduction to poi Functions
Poi is a sub-project of the jakata project under Apache. Its goal is to process ole2 objects. Hssf is a mature package, mainly used to process MS Excel files. Hwpf package is being improved, mainly used to process MS Word files. The hslf package is mainly used to process MS PowerPoint documents. In addition to Java, the poi component also provides Ruby interfaces that can be used directly by ruby.
Some of the poi code comes from OpenOffice. for processing Excel documents, poi is currently the most mature and stable Java open source project.