Bug 50696 - File Error: data may have been lost
Summary: File Error: data may have been lost
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.7-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 53010
  Show dependency tree
 
Reported: 2011-01-31 23:58 UTC by katsu
Modified: 2012-08-19 21:02 UTC (History)
1 user (show)



Attachments
source (2.32 KB, text/plain)
2011-01-31 23:58 UTC, katsu
Details
the result of BiffViewer (15.55 KB, application/x-zip-compressed)
2011-02-06 19:20 UTC, katsu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description katsu 2011-01-31 23:58:33 UTC
Created attachment 26585 [details]
source

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.  

Yegor
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