Apache POI - Java Excel APIs



This chapter takes you through some of the flavors of Java Excel API and their features. There are many vendors who provide Java Excel related APIs; some of them are considered in this chapter.

Aspose Cells for Java

Aspose Cells for Java is a purely licensed Java Excel API developed and distributed by the vendor Aspose. The latest version of this API is 8.1.2, released in July 2014. It is a rich and heavy API (combination of plain Java classes and AWT classes) for designing the Excel component that can read, write, and manipulate spreadsheets.

The common uses of this API are as follows −

  • Excel reporting, build dynamic Excel reports
  • High-fidelity Excel rendering and printing
  • Import and export data from Excel spreadsheets
  • Generate, edit, and convert spreadsheets

JXL

JXL is a third-party framework designed for Selenium that supports data driven automation on web browsers (auto-update of data on web browsers). However it is also used as a common support library for JExcel API because it has basic features to create, read, and write spreadsheets.

The basic features are as follows −

  • Generate Excel files
  • Import data from workbooks and spreadsheets
  • Obtain the total number of rows and columns

Note − JXL supports only .xls file format and it cannot handle large data volume.

JExcel

JExcel is a purely licensed API provided by Team Dev. Using this, programmers can easily read, write, display, and modify Excel workbooks in both .xls and .xlsx formats. This API can be easily embedded with Java Swing and AWT. The latest version of this API is Jexcel-2.6.12, released in 2009.

The main features are as follows −

  • Automate Excel application, workbooks, spreadsheets, etc
  • Embed workbooks in a Java Swing application as ordinary Swing component
  • Add event listeners to workbooks and spreadsheets
  • Add event handlers to handle the behavior of workbook and spreadsheet events
  • Add native peers to develop custom functionality

Apache POI

Apache POI is a 100% open source library provided by Apache Software Foundation. Most of the small and medium scale application developers depend heavily on Apache POI (HSSF + XSSF). It supports all the basic features of Excel libraries; however, rendering and text extraction are its main features.

Circle
Advertisements