Bug 53433 - LastCellOfRowDummyRecord is fired unneccessarily whenever formula cell(returning String Result) is encountered
Summary: LastCellOfRowDummyRecord is fired unneccessarily whenever formula cell(return...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.8-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-18 20:37 UTC by Manohar Bhat
Modified: 2014-07-30 23:11 UTC (History)
0 users



Attachments
Test file for which XLS2CSVmra fails (13.50 KB, application/vnd.ms-excel)
2012-06-18 20:37 UTC, Manohar Bhat
Details
This version ignores LastCellOfRowDummyRecord for detecting row end (11.91 KB, patch)
2012-06-18 20:42 UTC, Manohar Bhat
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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)