12.6.15

Apache POI vs JXL

Comparison of POI and JXL libraries to work with Excel for data driving tests in Selenium and Java


Apache POI JXL
 Is actively maintained Not under active dev and maintenance, last update was in 2012
does not support new xml format like XLSX
seems simpler to use
Apache poi does not seem to have a direct method to get the content of a particular cell via the parent "sheet" object
And above that we have to define the method of capture based on the data type for each cell like string, numeric, boolean, etc
And then for a numeric value, it would return a value of 1.0 even if the cell just had "1"
But I have overcome this limitation by converting the cell data into string before actually passing it on as a value. So this is not an issue any more.
Apache POI does not have any method to get a count of all the columns present in an excel; JXL has such a method. This would have been really useful when reading data from excel for parameterization
JXL does not support the Excel 2007+ ".XLSX" format; it only supports the old BIFF (binary) ".xls" format. Apache POI supports both with a common design.
Additionally, the Java portion of the JXL API was last updated in 2009 (3 years, 4 months ago as I write this), although it looks like there is a C# API. Apache POI is actively maintained.
JXL doesn't support Conditional Formatting, Apache POI does, although this is not that significant, because you can conditionally format cells with your own code.
JXL doesn't support rich text formatting, i.e. different formatting within a text string; Apache POI does support it.
JXL only supports certain text rotations: horizontal/vertical, +/- 45 degrees, and stacked; Apache POI supports any integer number of degrees plus stacked.
JXL doesn't support drawing shapes; Apache POI does.
JXL supports most Page Setup settings such as Landscape/Portrait, Margins, Paper size, and Zoom. Apache POI supports all of that plus Repeating Rows and Columns.
JXL doesn't support Split Panes; Apache POI does.
JXL doesn't support Chart creation or manipulation; that support isn't there yet in Apache POI, but an API is slowly starting to form.

Apache POI has a more extensive set of documentation and examples available than JXL.

there is j-excel which supports xlsx but its proprietary








No comments:

Post a Comment