Bug 42420 - 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.0-dev
Hardware: Other other
: P2 normal with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on: 41038
Blocks:
  Show dependency tree
 
Reported: 2007-05-15 03:50 UTC by N Shah
Modified: 2008-04-30 19:17 UTC (History)
1 user (show)



Attachments
File that breaks in 3.x (635.50 KB, application/octet-stream)
2007-12-10 02:48 UTC, Torben W
Details
Sample code (835 bytes, application/octet-stream)
2007-12-10 02:49 UTC, Torben W
Details

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