Edit report at http://pear.php.net/bugs/bug.php?id=12848&edit=1

ID: 12848
Comment by: pierre42
Reported By: pierre dot beaumadier@gmail.com
Summary: Excel "File Error: data may have been lost."
Status: Open
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Any
Package Version: CVS
PHP Version: 5.2.4
New Comment:

I have the same problem here despite having no blank cell at all...

Previous Comments:

[2010-01-25 21:29:59] mfeldman

This problem also occurs if you have empty worksheets in a workbook.


[2009-11-13 19:38:50] iterator

I am getting this same error message, but it's not because I'm rewriting
cells. The error message is unexplained. I've had success in stopping
the error only by reducing the amount of iterations on the loop(s) where
the error happens. But that is not a solution because the data actually
does become lost.


[2009-05-15 07:17:14] kewlbuddy

Thanks 'johou', The error solved: Need to change excel generation code.
So that, you not re-write the cell again and again.

/* insert a blank in a cell */

then according to condition write text in the same cell

$worksheet->writeString(0,2,"Testing Text",$format);

As a result File error get removed.


[2008-06-16 09:13:19] robbertwethmar

first i tried to write a wrapper class to fix the problem, that didn't
work, so i changed the pear lib itself. (worksheet.php). I only patched
writeNumber, writeString and writeFormula, and didn't bother to do a
full rewrite (yet). This fixes my problem for now, because i only use
those three functions to put data in the sheet...
Doing this however, i REALLY verified the rewriting of cells is the
problem. By rewriting the same cell ends up in the file multiple times.
My patch avoids that, by storing the cells in memory and only writing to
file on close.
So its a proof of concept, this solution works but might be a bit
difficult to implement in full.


[2008-06-12 10:01:26] robbertwethmar

Rewriting cells could VERY well be the problem: for me it ONLY occurs in
reports were i rewrite cells. Rewriting them is not simple unfortunately


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedApr 10, '13 at 2:14p
activeApr 10, '13 at 2:14p

1 user in discussion

Pierre42: 1 post



site design / logo © 2022 Grokbase