Read and write Excel three common techniques
1.POI
2.JXL
3.FASTEXCEL
Poi
Apache POI is an open source library of the Apache Software Foundation, where POI provides APIs to Java programs to read and write to Microsoft Office format archives. HSSF is the abbreviation for horrible SpreadSheet format, and "Nasty spreadsheet format", through HSSF, you can use plain Java code to read, write, and modify Excel files. where it has the following functions:
hssf-read-write mocrosoft Excel format file function
xssf-read-write Mocrosoft Excel ooxml format archive function
hwpf-Read and write Mocrosoft World format file functions
hslf-to shoes mocrosoft PowerPoint format file features
hdgf-ability to read and write Mocrosoft Visio format files
JXL
Java Excel is an open source project that can read the contents of an Excel file, create an Excel file, and update an Excel file that already exists. Includes settings for common formatting: fonts, colors, this sutra, merged cells, and more.
Comparison of POI and JXL
POI: High efficiency, but the operation is relatively complex; support formulas, macros, image graphs Some enterprise applications will be very useful, can be modified cell properties, support font, number, date operation.
JXL: Low efficiency, simple operation, partial support for some enterprise application operations, ability to modify cell properties, format support is not as strong as POI, support font, number, date operation.
Fastexcel
Fastexcel is an Excel file read-write component that is developed in plain Java and supports the Excel 97-2003 file format. Fastexcel can only read the character information of the cell, and other properties such as color, font, etc. are not supported, so fastexcel only requires very little memory.
Another common file format is described: PDF or RTF
IText
By Itext, you can not only generate PDFs or RTF documents, but also XML. After the HTML file is converted to PDF file to download the Itext.jar file, simply add the Itext.jar path to the system's classpath, and you can use the Itext class library in your program.
Java read and write Excel three common technologies