From 2860b56cc0862978540011bfb37688da7b3dc733 Mon Sep 17 00:00:00 2001 From: Ulf Date: Thu, 4 Jun 2015 11:44:28 +0200 Subject: [PATCH 1/2] Added support for duplicate value conditional formatting --- Classes/PHPExcel/Reader/Excel2007.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php index c439bfc93..11d510843 100644 --- a/Classes/PHPExcel/Reader/Excel2007.php +++ b/Classes/PHPExcel/Reader/Excel2007.php @@ -921,7 +921,7 @@ public function load($pFilename) if (!$this->readDataOnly && $xmlSheet && $xmlSheet->conditionalFormatting) { foreach ($xmlSheet->conditionalFormatting as $conditional) { foreach ($conditional->cfRule as $cfRule) { - if (((string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_NONE || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_CELLIS || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_EXPRESSION) && isset($dxfs[intval($cfRule["dxfId"])])) { + if (((string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_NONE || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_CELLIS || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_EXPRESSION || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_DUPLICATEVALUES) && isset($dxfs[intval($cfRule["dxfId"])])) { $conditionals[(string) $conditional["sqref"]][intval($cfRule["priority"])] = $cfRule; } } From 5f66eed0fb2442266b85f4bdfaa8af77ca7a94d4 Mon Sep 17 00:00:00 2001 From: Ulf Date: Thu, 4 Jun 2015 11:50:51 +0200 Subject: [PATCH 2/2] Added 'duplicateValues' condition --- Classes/PHPExcel/Style/Conditional.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Classes/PHPExcel/Style/Conditional.php b/Classes/PHPExcel/Style/Conditional.php index 331362b42..9ecfcc80e 100644 --- a/Classes/PHPExcel/Style/Conditional.php +++ b/Classes/PHPExcel/Style/Conditional.php @@ -36,10 +36,11 @@ class PHPExcel_Style_Conditional implements PHPExcel_IComparable { /* Condition types */ - const CONDITION_NONE = 'none'; - const CONDITION_CELLIS = 'cellIs'; - const CONDITION_CONTAINSTEXT = 'containsText'; - const CONDITION_EXPRESSION = 'expression'; + const CONDITION_NONE = 'none'; + const CONDITION_CELLIS = 'cellIs'; + const CONDITION_CONTAINSTEXT = 'containsText'; + const CONDITION_EXPRESSION = 'expression'; + const CONDITION_DUPLICATEVALUES = 'duplicateValues'; /* Operator types */ const OPERATOR_NONE = '';