Bug 53433

Summary: LastCellOfRowDummyRecord is fired unneccessarily whenever formula cell(returning String Result) is encountered
Product: POI Reporter: Manohar Bhat <overtomanu>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.8-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Test file for which XLS2CSVmra fails
This version ignores LastCellOfRowDummyRecord for detecting row end

Description Manohar Bhat 2012-06-18 20:37:42 UTC
Created attachment 28956 [details]
Test file for which XLS2CSVmra fails

Whenever a formula cell(returning String result) is encountered, three records are fired by the HSSF Event API in the given order(FormulaRecord,LastCellOfRowDummyRecord,StringRecord).

LastCellOfRowDummyRecord which is fired in between FormulaRecord and StringRecord should not occur as it should be fired only when the row ends.


Attached is a Xltest file for which existing XLS2CSVmra program fails.
Also there is a patched program which manages to give correct output.
However it is not tested thoroughly.
Comment 1 Manohar Bhat 2012-06-18 20:42:45 UTC
Created attachment 28957 [details]
This version ignores LastCellOfRowDummyRecord for detecting row end

This version of XLS2CSVmra does not depend on LastCellOfRowDummyRecord to detect row end. But whenever the "thisRow" value of cell increases, it is assumed that a new row is beginning.
Comment 2 Nick Burch 2014-07-30 23:11:54 UTC
It looks like this specific problem was solved some time ago

As of r1614789, I have added some very detailed unit tests for this, which show that the string record following formula records behaves as expected. 

(I did find some other issues around missing rows at the start while working on this, which have now been fixed)