From 2ec5a8b3bbaf3fbf03bc8e5bdb916dc7f7772570 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Tue, 5 Oct 2010 22:20:49 +0000 Subject: [PATCH] Bugfix: Workitem 14374 - BUG : Excel5 and setReadFilter ? git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@61896 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Reader/Excel5.php | 7 +++++-- changelog.txt | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Classes/PHPExcel/Reader/Excel5.php b/Classes/PHPExcel/Reader/Excel5.php index 33357bfc..969c1673 100644 --- a/Classes/PHPExcel/Reader/Excel5.php +++ b/Classes/PHPExcel/Reader/Excel5.php @@ -828,8 +828,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader // treat SHAREDFMLA records if ($this->_version == self::XLS_BIFF8) { foreach ($this->_sharedFormulaParts as $cell => $baseCell) { - $formula = $this->_getFormulaFromStructure($this->_sharedFormulas[$baseCell], $cell); - $this->_phpSheet->getCell($cell)->setValueExplicit('=' . $formula, PHPExcel_Cell_DataType::TYPE_FORMULA); + list($column, $row) = PHPExcel_Cell::coordinateFromString($cell); + if ( !is_null($this->getReadFilter()) && $this->getReadFilter()->readCell($column, $row, $this->_phpSheet->getTitle()) ) { + $formula = $this->_getFormulaFromStructure($this->_sharedFormulas[$baseCell], $cell); + $this->_phpSheet->getCell($cell)->setValueExplicit('=' . $formula, PHPExcel_Cell_DataType::TYPE_FORMULA); + } } } } diff --git a/changelog.txt b/changelog.txt index 8f708109..4832bfca 100644 --- a/changelog.txt +++ b/changelog.txt @@ -49,6 +49,7 @@ Fixed in SVN: - Bugfix: (MBaker) Added autoloader to DefaultValueBinder and AdvancedValueBinder - Bugfix: (MBaker) Modified PHPExcel_Shared_Date::isDateTimeFormatCode() to return false if format code begins with "_" or with "0 " to prevent false positives These leading characters are most commonly associated with number, currency or accounting (or occasionally fraction) formats +- Bugfix: (MBaker) Workitem 14374 - BUG : Excel5 and setReadFilter ? 2010-08-26 (v1.7.4):