Bug 50696

Summary: File Error: data may have been lost
Product: POI Reporter: katsu <katsu.shoka>
Component: HSSFAssignee: POI Developers List <dev>
Severity: normal CC: cbenjaram
Priority: P2    
Version: 3.7-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 53010    
Attachments: source
the result of BiffViewer

Description katsu 2011-01-31 23:58:33 UTC
Created attachment 26585 [details]

We need to read excel template file, and add some comments to some cells of the worksheet . The excel template file has a few comments and Shapes.

when We open the file, we alwasys get the error "File Error: data may have been lost". 
Please help.
Comment 1 Nick Burch 2011-02-01 04:48:55 UTC
What version of excel is this with? And what parts of the file were affected? If you save the version that excel has fixed up, how does that differ from the poi one?
Comment 2 katsu 2011-02-03 19:52:17 UTC
Excel Version: Microsoft Office Excel 2003(11.8328.8329) SP3

i think Sheet.aggregateDrawingRecords(..) were affected.

I don't know what's difference.
Comment 3 Nick Burch 2011-02-04 06:50:16 UTC
Can you try using org.apache.poi.hssf.dev.BiffViewer to identify the key records?
Comment 4 katsu 2011-02-06 19:20:57 UTC
Created attachment 26615 [details]
the result of BiffViewer
Comment 5 katsu 2011-02-06 19:23:17 UTC
i don't know which part is wrong. can you check the attachment files
Comment 6 Yegor Kozlov 2011-06-25 13:49:15 UTC
It is a limitation of HSSF - comments are graphic objects and HSSF can create drawings from scratch, but cannot
modify existing ones. This means that if you add an comment to a sheet that
already has graphic objects (comments, shapes, pictures, etc.) then the existing graphic objects are invalidated.  

Comment 7 Yegor Kozlov 2011-06-25 13:51:23 UTC
*** Bug 47624 has been marked as a duplicate of this bug. ***
Comment 8 Evgeniy Berlog 2012-08-19 21:02:14 UTC
This problem should be fixed in trunk.

Please try with a nightly build - see download links on http://poi.apache.org/
or build yourself from SVN trunk, see http://poi.apache.org/subversion.html