From 1c6fa7b5ab1d9d29aba4e1aafe37e4f69d8d6cdb Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Wed, 5 Jan 2011 17:53:17 +0000 Subject: [PATCH] Bugfix: Work item 15046 - 1.7.5 fails cell->getCalculatedValue() git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@66479 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Calculation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/PHPExcel/Calculation.php b/Classes/PHPExcel/Calculation.php index 0478b05..60dca6e 100644 --- a/Classes/PHPExcel/Calculation.php +++ b/Classes/PHPExcel/Calculation.php @@ -40,9 +40,9 @@ if (!defined('CALCULATION_REGEXP_CELLREF')) { // Test for support of \P (multibyte options) in PCRE if(defined('PREG_BAD_UTF8_ERROR')) { // Cell reference (cell or range of cells, with or without a sheet reference) - define('CALCULATION_REGEXP_CELLREF','((([^,!]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d+)'); + define('CALCULATION_REGEXP_CELLREF','((([^\s,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d{1,7})'); // Named Range of cells - define('CALCULATION_REGEXP_NAMEDRANGE','((([^,!]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?([_A-Z][_A-Z0-9]*)'); + define('CALCULATION_REGEXP_NAMEDRANGE','((([^\s,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?([_A-Z][_A-Z0-9]*)'); } else { // Cell reference (cell or range of cells, with or without a sheet reference) define('CALCULATION_REGEXP_CELLREF','(((\w*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d+)');