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.
Please revert back with a solution, or if further explanation / attachments are required. Thx.
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.
Created attachment 21251 [details] File that breaks in 3.x
Created attachment 21252 [details] Sample code
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)
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
This seems to be fixed now in 3.1 BETA1! Thanks, Torben