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

Bug #16030 Absolute ranges fail
Submitted: 2009-03-13 07:36 UTC
From: jabouillei Assigned:
Status: Verified Package: Spreadsheet_Excel_Writer (version 0.9.2)
PHP Version: 5.2.5 OS: SuSE and Cent OS
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 : 46 - 10 = ?

 
 [2009-03-13 07:36 UTC] jabouillei (Todd Ruth)
Description: ------------ Attempting to write the following formula resulted in a "')' token expected" message appearing in the cell instead of the desired formula: =(0+SUMPRODUCT(M6:M14;$G6:$G14)+M15*$G15) Fortunately, this is easy to fix (after hours of debugging). Here is how to fix it: Open Parser.php and find every place that there is a regular expression for a range. Replace the double quotes that enclose the regular expression with single quotes. Then re-use a pair of the regular expressions you just updated (one for ":" and one for "..") in the _convertRange2d function. The off-the-shelf version of that function doesn't handle "$"s. You're all set! Test script: --------------- =(0+SUMPRODUCT(M6:M14;$G6:$G14)+M15*$G15) Expected result: ---------------- The formula should appear in the cell. Actual result: -------------- "')' token expected" appears in the cell.

Comments

 [2009-11-29 22:56 UTC] cschmitz (Carsten Schmitz)
-Status: Open +Status: Verified -Package Version: 0.9.1 +Package Version: 0.9.2
I can verify this. Test script: <? require_once ("Spreadsheet/Excel/Writer.php"); $WB =& new Spreadsheet_Excel_Writer(); $sheet =& $WB->addWorksheet(); $sheet->write(0, 0, '=(0+SUMPRODUCT(M6:M14;$G6:$G14)+M15*$G15)'); $WB->send("test.xls"); $WB->Close(); ?>
 [2010-01-08 23:06 UTC] alienation (Miguel Andrade)
Could you please post your corrected strings? I've tried to correct it, but I think I don't have the right regular expression. Thanks