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

ID: 12629
Comment by: meustrus
Reported By: mewsterus at yahoo dot com
Summary: setVersion(8) crashes Excel 2000 w/ worksheets
containing off-sheet references
Status: Verified
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Irrelevant
Package Version: 0.9.1
PHP Version: Irrelevant
New Comment:

Is there any work being done on this error? I need large text (more
than 255 chars) across worksheets...would look the source myself but I'm
not familiar with it. Maybe I will anyway, but I'm sure someone else
could fix it faster than I can.

In Excel 2007, displays #N/A wherever a cross-worksheet reference
occurs. Other formulae are unaffected.


Previous Comments:
------------------------------------------------------------------------

[2008-03-22 23:15:21] doconnor

Agreed.

#Name is coming up on the second sheet.

Thanks Bishop; I'll take a peek (no promises it'll get fixed) or try to
get someone else to.

------------------------------------------------------------------------

[2008-03-22 16:42:59] bishop

Perhaps, but bug 2010 is all over the place: setVersion(), print
functions, encoding, etc. So pretty much any bug related to "crashing
Excel when using Excel Writer" will fit with 2010.

This issue seems to be reproducible with the code as given and seems to
be specific to the code given -- ie, no fluff code. I would not merge
the two, as bug 2010 seems to be so non-specific as to be hard to
actually fix.

Finally, this bug describes the effect seen in OpenOffice (1.0,
incidentally), whereas bug 2010 doesn't seem to discuss OpenOffice
particulars for the various problem reports.

------------------------------------------------------------------------

[2008-03-22 08:25:34] doconnor

Is this a duplicate of bug #2010?

------------------------------------------------------------------------

[2007-12-06 11:23:34] bishop

Description:
------------
Using off-sheet references in formulas, such as:
* ='SheetA'!A1
* ='Test Worksheet'!$B$12

causes Excel 2000 to crash (and OpenOffice to show #NAME?) when loading
files written with BIFF 8. On-sheet references work correctly with
setVersion(8).

Test script:
---------------
// create the workbook
// NOTE: take out the setVersion() and everything works fine
require_once('Spreadsheet/Excel/Writer.php');
$workbook =& new Spreadsheet_Excel_Writer($excelFilename);
$workbook->setVersion(8);

// add two sheets
// NOTE: order doesn't seem to matter -- in either order, crashes
(Excel) or invalid references (OO) occur with setVersion(8) called
$sheetA =& $workbook->addWorksheet('sheetA');
$sheetB =& $workbook->addWorksheet('sheetB');

// put a value on sheet A, then reference that value on sheet B
// NOTE: Either of the writeFormula() crash Excel and yield #NAME? in
OO with setVersion(8) called
$sheetA->write(0, 0, 'Hello, World!');
$sheetB->writeFormula(0, 0, "='sheetA'!A1"); // M$ Excel, canonical
$sheetB->writeFormula(0, 1, "=sheetA!A1"); // M$ Excel

// finalize the file
$workbook->close();

Expected result:
----------------
The file specified by $excelFilename will contain an Excel workbook
that can be opened in Excel 2000 without crash, then display "Hello,
World" on Sheet A, A1 and Sheet B, A1 and A2.

Actual result:
--------------
Excel 2000 crashes, while OpenOffice displays #NAME? in all cells
containing off-sheet references.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 12, '09 at 12:09a
activeDec 12, '09 at 12:09a
posts1
users1
websitepear.php.net

1 user in discussion

Meustrus: 1 post

People

Translate

site design / logo © 2022 Grokbase