Bug 13796

Summary: Error Reading Formula Record (optimized if, external link)
Product: POI Reporter: Michael Tosdevin <michael.tosdevin>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Example workbook causing the problem

Description Michael Tosdevin 2002-10-20 17:51:24 UTC
Using the EventFactory approach to read an Excel workbook I get an error when 
processing a FormulaRecord. A similar error is reported by EFBiffViewer as seen 
below:

Exception in thread "main" java.lang.NullPointerException
        at org.apache.poi.hssf.record.FormulaRecord.toString(FormulaRecord.java:
548)
        at org.apache.poi.hssf.dev.EFBiffViewer$1.processRecord(EFBiffViewer.jav
a:93)
        at org.apache.poi.hssf.eventmodel.HSSFRequest.processRecord(HSSFRequest.
java:173)
        at org.apache.poi.hssf.eventmodel.HSSFEventFactory.genericProcessEvents(
HSSFEventFactory.java:208)
        at org.apache.poi.hssf.eventmodel.HSSFEventFactory.processEvents(HSSFEve
ntFactory.java:139)
        at org.apache.poi.hssf.dev.EFBiffViewer.run(EFBiffViewer.java:98)
        at org.apache.poi.hssf.dev.EFBiffViewer.main(EFBiffViewer.java:115)

The workbook has a reference to an external workbook at the point which I think 
is causing the problem. I have the workbook which I can forward if this would 
be useful.
Comment 1 Andy Oliver 2002-10-20 20:22:21 UTC
please click create a new attachment and attach the worksheet to this bug.
Comment 2 Michael Tosdevin 2002-10-26 07:17:28 UTC
Created attachment 3614 [details]
Example workbook causing the problem
Comment 3 Andy Oliver 2002-10-26 09:08:56 UTC
optimized if, external link.  (notes for developers and myself)
Comment 4 Avik Sengupta 2003-07-31 19:56:32 UTC
Fixed in 2.0pre3. 

Comitting the excel file as a testcase.