https://issues.apache.org/bugzilla/show_bug.cgi?id=45038
Summary: Unable to construct record instance (HSSFWorkbook)
Product: POI
Version: 3.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Hello,
with the version 3.0.1 of POI I can do this code :
is = new FileInputStream(myExcelFile);
POIFSFileSystem poifsFileSystem = new POIFSFileSystem(is);
HSSFWorkbook wb = new HSSFWorkbook(poifsFileSystem, false);
However, when I want to use the version 3.0.2 of POI (for use the Class
"HSSFFormulaEvaluator"), it's impossible :
HSSFWorkbook wb = new HSSFWorkbook(poifsFileSystem, false); // Exception with
3.0.2 (and 2.5.1), no probleme with 3.0.1
The Exception is :
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record
instance
at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:199)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:117)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:207)
at business.extractfees.Go.doTreatmentByExcelFile(Go.java:298)
at business.extractfees.Go.extractDataFromRepertoryGeneral(Go.java:205)
at business.extractfees.Go.doTreatment(Go.java:87)
at business.extractfees.Go.main(Go.java:67)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
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:187)
... 6 more
Caused by: java.lang.UnsupportedOperationException: Unknown Ptg in Formula:
0x2 (2)
at org.apache.poi.hssf.record.formula.Ptg.createPtg(Ptg.java:357)
at org.apache.poi.hssf.record.DVRecord.fillFields(DVRecord.java:201)
at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
at org.apache.poi.hssf.record.DVRecord.<init>(DVRecord.java:134)
... 11 more
I use for POI 3.0.1 :
3.0.1 :
poi-3.0.1-FINAL-20070705.jar
poi-contrib-3.0.1-FINAL-20070705.jar
poi-scratchpad-3.0.1-FINAL-20070705.jar
and for POI 3.0.2 :
poi-3.0.2-FINAL-20080204.jar
poi-contrib-3.0.2-FINAL-20080204.jar
poi-scratchpad-3.0.2-FINAL-20080204.jar
NB : the file that I open is not on my station, but on the network; and the
file is open ONLY for reading (protected by password if you want to write).
So, is it normal that I can open the file with the version 3.0.1, but not with
3.0.2 ?
Is it possible to try to evaluate a Formula with POI 3.0.1 ?
Sincerely,
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]