I am having a problem when I try and open an existing Excel file.
ByteArrayOutputStream ba = null;
FileInputStream fileInputStream = null;
HSSFWorkbook hssfWorkbook = null;
ba = new ByteArrayOutputStream();
fileInputStream = new FileInputStream(
httpServletRequest.getSession().getServletContext().getInitParameter(
"repReviewFile" ) );
POIFSFileSystem fs = new POIFSFileSystem( fileInputStream );
hssfWorkbook = new HSSFWorkbook( fs );
On this last line, I get this exception:
rg.apache.poi.hssf.record.RecordFormatException: Unable to construct record
instance, the following exception occured: null
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:237)
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:130)
Does anyone know why this might be happening. I have no protection or auto
filters set on the file either.
Thanks.
Bryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/