Bug 45699 - POI loses row/cell records when merged cell records are out of place
Summary: POI loses row/cell records when merged cell records are out of place
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: PC Windows XP
: P4 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-27 20:04 UTC by Josh Micich
Modified: 2012-12-19 11:10 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Micich 2008-08-27 20:04:53 UTC
Follow-on from bug 45698.
  
After fixing that bug, POI can read+write back the same sample file (attachment (id=22488)) without throwing an exception, but some data is lost.  The output file is less than 1.4Mb but probably should be more than 4Mb.  Excel opens the output file without reporting an error.  However, all but a few rows of content is lost from most sheets.  Sheets without merged cells seem unaffected.

The problem seems to stem from the presence of MERGEDCELLS records between the row/cell records.  The OOO documentation suggests that MERGEDCELLS should be written after the 'Sheet View Settings Block' which is well after the Row Blocks.  Excel(2007) seems to follow this standard.

This example file was probably created by some other application besides Excel.
Comment 1 Josh Micich 2008-08-27 21:32:07 UTC
Fixed in svn r689716

Junit added

Paul, do you know which application produced the file in question?