Running code from jakarta-poi-1.7.0-dev-bin.zip, I get the following stack trace when reading a file of about 130 rows and 4 columns( not really that big!): java.lang.NullPointerException at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSh eet.java:174) at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:136) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1 64) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1 90) at com.ibi.preparsers.XDExcelpreParser.transform(XDExcelpreParser.java:1 07) at com.ibi.edaqm.XDWorker.parseAndValidate(XDWorker.java:1202) at com.ibi.edaqm.XDWorker.parseAndValidate(XDWorker.java:1147) at com.ibi.edaqm.XDFileWorker.run(XDFileWorker.java:208) at java.lang.Thread.run(Thread.java:484) This does not happen when the file has 1 row less. The call to HSSFWorkbook is as following: HSSFWorkbook workbook = new HSSFWorkbook(new ByteArrayInputStream (input.getBytes())); where the file was initially read into a String input.
Created attachment 2870 [details] excel file producing an error
I ran the latest CVS against the attachment and the following worked fine: HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream("c:/att.xls")); Maybe the input.getBytes that you are calling is not providing the entire set of bytes or try the latest build from the nightly area and let us know if it is fixed or not: http://jakarta.apache.org/builds/jakarta-poi/nightly/ Jason
you are right! we were reading the file as bytes, converting them to String and then converting back to bytes - sort of legacy design, since originally we were only dealing with character files. changing code to deal with the original byte array fixed this problem. Thanks!