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

Bug #1706 Formulas refer to other Worksheets with "spezial" names don't work
Submitted: 2004-06-23 15:20 UTC
From: jan at traum-projekt dot com Assigned: xnoguer
Status: Closed Package: Spreadsheet_Excel_Writer
PHP Version: 4.3.3 OS: WinXP Pro
Roadmaps: (Not assigned)    
Subscription  


 [2004-06-23 15:20 UTC] jan at traum-projekt dot com
Description: ------------ When using a space or - (maybee there are other chars?) in worksheet-name and refer by a formula to a cell in such a worksheed I got following content in my formula-cell: Syntax error: , lookahead: , current char: 0 If the name is without space or - it works pretty fine. In Version 4 (http://pear.php.net/package/Spreadsheet_Excel_Writer/download/0.4) there seems to be an update for such bug (?), but it doesn't seems to work and I can't open the bugreport (anymore?) Cu Jan Reproduce code: --------------- <?php require_once 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer(); $worksheet =& $workbook->addWorkSheet("Test-Data"); $worksheet->write(0,0,100); $worksheet2 =& $workbook->addWorkSheet("Test Data"); $worksheet2->writeFormula(0,0,"='Test-Data'!A1"); $worksheet2->write(0,1,200); $worksheet3 =& $workbook->addWorkSheet(); $worksheet3->writeFormula(0,0,"='Test Data'!B1"); $workbook->send('test.xls'); $workbook->close(); ?>

Comments

 [2004-12-13 16:42 UTC] david dot blair at nsi1 dot com
I'm getting the Syntax error: ), lookahead: , current char: 0 also when I send a bad formula using writeFormula (or write) The line: $sheet->write(2, 1, "='SNTP'H47"); //missing the ! before the H// will also generate that syntax error (note SNTP doesn't have spaces or special characters)...don't know if this clue will help any of the coders or not...
 [2005-02-10 16:50 UTC] pear at schmidtjohannes dot de
my excel hang up (I am using the send function) if I try to use the formula function with this code: $worksheet->write(0,0, "=worksheet1!B1", $test); Same result by using writeFormula(); The PHP Script itself generates no error. Hope that helps.
 [2005-11-07 23:27 UTC] xnoguer at php dot net
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.