What is the better API to Reading Excel sheets in java - JXL or Apache POI -


which of 2 apis simpler read/write/edit excel sheets ? these apis not support csv extensions ?

using jxl file.xls , file.xlsx, exception like:

jxl.read.biff.biffexception: unable recognize ole stream     @ jxl.read.biff.compoundfile.<init>(compoundfile.java:116)     @ jxl.read.biff.file.<init>(file.java:127)     @ jxl.workbook.getworkbook(workbook.java:268)     @ core.readxlsheet.contentreading(readxlsheet.java:46)     @ core.readxlsheet.init(readxlsheet.java:22)     @ core.readxlsheet.main(readxlsheet.java:72) 

both .xls , .xlsx extensions. java version using : jdk1.6

i have used both jxl (now "jexcel") , apache poi. @ first used jxl, use apache poi.

first, here things both apis have same end functionality:

  • both free
  • cell styling: alignment, backgrounds (colors , patterns), borders (types , colors), font support (font names, colors, size, bold, italic, strikeout, underline)
  • formulas
  • hyperlinks
  • merged cell regions
  • size of rows , columns
  • data formatting: numbers , dates
  • text wrapping within cells
  • freeze panes
  • header/footer support
  • read/write existing , new spreadsheets
  • both attempt keep existing objects in spreadsheets read in intact far possible.

however, there many differences:

  • perhaps significant difference java jxl not support excel 2007+ ".xlsx" format; supports old biff (binary) ".xls" format. apache poi supports both common design.
  • additionally, java portion of jxl api last updated in 2009 (3 years, 4 months ago write this), although looks there c# api. apache poi actively maintained.
  • jxl doesn't support conditional formatting, apache poi does, although not significant, because can conditionally format cells own code.
  • jxl doesn't support rich text formatting, i.e. different formatting within text string; apache poi support it.
  • jxl supports text rotations: horizontal/vertical, +/- 45 degrees, , stacked; apache poi supports integer number of degrees plus stacked.
  • jxl doesn't support drawing shapes; apache poi does.
  • jxl supports page setup settings such landscape/portrait, margins, paper size, , zoom. apache poi supports of plus repeating rows , columns.
  • jxl doesn't support split panes; apache poi does.
  • jxl doesn't support chart creation or manipulation; support isn't there yet in apache poi, api starting form.
  • apache poi has more extensive set of documentation , examples available jxl.

additionally, poi contains not main "usermodel" api, event-based api if want read spreadsheet content.

in conclusion, because of better documentation, more features, active development, , excel 2007+ format support, use apache poi.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -