All: Please help us out in the below problem while uploading excel file through POI's api.
The java program throws following exception while reaching at this line POIFSFileSystem fs = new POIFSFileSystem(item.getInputStream()); //item is FileItem object
Exception message: org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance, the following exception occured: null
& In tomcat's catalina window: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>HSSFWorkbook.java:1
NB:The excel file is having four sheets with tabular formatted data.
Regards Baseet Ahmed
****************** Do Make Nikah(Marriage/Wedding ceremony) simple(cheap/easy) so that it becomes difficult(expensive/hard) to do Rape. -ISLAM- ******************
Just to make sure: can you open the file you uploaded after the upload - the copy that's now on the server? Have you made sure that it is byte for byte identical to the original file? Can you open the original file with POI? [ June 01, 2008: Message edited by: Ulf Dittmer ]
Joined: Dec 18, 2006
Ulf, Please check your private messages.
Originally posted by Ulf: can you open the file you uploaded after the upload - the copy that's now on the server? Have you made sure that it is byte for byte identical to the original file?
We have checked the uploaded file(on temp area of tomcat) with our original file. Both are looking same.Probably this is causing problem with particular excel file. Because other excel files are working fine.