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

Bug #14515 writeUrl only uses writeString, never writeNumber
Submitted: 2008-08-18 11:14 UTC
From: gpalsson Assigned: doconnor
Status: Closed Package: Spreadsheet_Excel_Writer (version 0.9.2)
PHP Version: 5.2.6 OS: fedora
Roadmaps: (Not assigned)    
Subscription  


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 : 44 + 29 = ?

 
 [2008-08-18 11:14 UTC] gpalsson (Gustav Palsson)
Description: ------------ When making a link with createUrl function, numbers cannot later be used for formulas like SUM(1A:2A) because createUrl always uses createString for making the text in the field. Test script: --------------- $worksheet->writeUrl($vRow, $vCol, $vProductUrl, $vProductPrice, $format_blue_number); Expected result: ---------------- A link with a number visible should be inserted into the sheet. Actual result: -------------- A link with a string is inserted to the sheet. Now formulas concerning numbers are not working with these cells. It can be fixed easily by changing line 1881 in WorkSheet to $str_error = is_numeric($str) ? $this->writeNumber($row1, $col1, $str, $format) : $this->writeString($row1, $col1, $str, $format);

Comments

 [2009-11-30 16:34 UTC] cschmitz (Carsten Schmitz)
-Status: Open +Status: Verified -Package Version: 0.9.1 +Package Version: 0.9.2
 [2011-01-11 02:58 UTC] ecaron (Eric Caron)
 [2011-01-11 02:59 UTC] ecaron (Eric Caron)
Gustav's suggestion works, but in addition to _writeUrlWeb it needs to be applied in _writeUrlInternal and _writeUrlExternal. I've attached the patch to resolve this bug/feature.
 [2012-01-25 19:34 UTC] doconnor (Daniel O'Connor)
-Status: Verified +Status: Closed -Assigned To: +Assigned To: doconnor
This bug has been fixed in SVN. 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.