Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Bug #12629 setVersion(8) crashes Excel 2000 w/ worksheets containing off-sheet references
Submitted: 2007-12-06 16:23 UTC
From: bishop Assigned:
Status: Verified Package: Spreadsheet_Excel_Writer (version 0.9.1)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 19 = ?

 
 [2007-12-06 16:23 UTC] bishop (Bishop Bettini)
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.

Comments

 [2008-03-22 12:25 UTC] doconnor (Daniel O'Connor)
Is this a duplicate of bug #2010?
 [2008-03-22 20:42 UTC] bishop (Bishop Bettini)
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-23 03:15 UTC] doconnor (Daniel O'Connor)
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.
 [2009-12-12 06:04 UTC] meustrus (rey meustrus)
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.