Skip to main content

Posts

Showing posts with the label reading excel sheet

How To Read/Write Excel Sheet with Java Program

There are two good choices for reading & writing Microsoft Excel Spreadsheet files from Java, in a platform independent way, - jexcelapi and Jakarta POI (HSSF). Both of them provide nice interface to access Excel data structure and even generate new spreadsheet. I have done extensive tests with both of them for a high-profile project for a Fortune 500 company. Previously also I had successfully used HSSF for another high profile client. In the paragraphs below I present my conclusions and sample code for reading Excel spreadsheet from Java using both the libraries. Comparison of JExcelAPI with Jakarta-POI (HSSF) 1. JExcelAPI is clearly not suitable for important data. It fails to read several files. Even when it reads it fails on cells for unknown reasons. In short JExcelAPI isnt suitable for enterprise use. 2. HSSF is the POI Projects pure Java implementation of the Excel  97(-2002) file format. It is a mature product and was able to correctly and effortlessly read excel...