Bug 42420

Summary: File Error: data may have been lost
Product: POI Reporter: N Shah <nisarg.shah>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: nisarg.shah
Priority: P2 Keywords: PatchAvailable
Version: 3.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: other   
Bug Depends on: 41038    
Bug Blocks:    
Attachments: File that breaks in 3.x
Sample code

Description N Shah 2007-05-15 03:50:46 UTC
Hi,

We have a complex xls. We need to open a stream, write some data to one of the 
worksheets of the workbook. The xls has a few macros within as well.

We are able to update data in the worksheet as desired. However, on re-opening 
the file, we get the error "File Error: data may have been lost". This is 
similar to bug number 18155. We could not get a patch for the same from all 
the threads we came across.

Please help. Thx in advance.
Comment 1 N Shah 2007-05-15 03:55:20 UTC
Please revert back with a solution, or if further explanation / attachments 
are required.

Thx.
Comment 2 Torben W 2007-12-05 00:51:19 UTC
We have the same problem. With a complex sheet, the "File Error: data may have
been lost" message appears.

When running the exact same code with 2.5.1-final-20040804, everything works as
expected.
Comment 3 Torben W 2007-12-10 02:48:12 UTC
Created attachment 21251 [details]
File that breaks in 3.x
Comment 4 Torben W 2007-12-10 02:49:20 UTC
Created attachment 21252 [details]
Sample code
Comment 5 Torben W 2007-12-10 02:53:18 UTC
I've attached code and the XLS file that shows the error.

When run in 3.0.1-Final, and 3.0.2-Beta1, the resulting file gives a "File
error: data may have been lost." error message when opened in Excel (Microsoft
Excel 2002 SP3)

When run with 2.5.1-final the resulting file works. Although it logs a warning
message when generating the file:
[WARNING] Unknown Ptg 1c (28)
Comment 6 Yegor Kozlov 2007-12-10 23:58:00 UTC
Looks like the origin of this bug is the same as in Bug 41038: MulBlankRecord is
not properly serialized. If possible, I will fix it by POI 3.0.2, otherwise the
fix will go in POI 3.1. 

Yegor
Comment 7 Torben W 2008-04-30 05:38:27 UTC
This seems to be fixed now in 3.1 BETA1!

Thanks,
Torben