From 968bfef0a26b0b83cebd742eeaaea514d2be4b60 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Fri, 15 Nov 2013 19:24:51 +0000 Subject: [PATCH] Bugfix: When duplicating conditional styles, styles shifted by one column to the right --- Classes/PHPExcel/Worksheet.php | 2 +- changelog.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Worksheet.php b/Classes/PHPExcel/Worksheet.php index 493b462b..24b5e3e8 100644 --- a/Classes/PHPExcel/Worksheet.php +++ b/Classes/PHPExcel/Worksheet.php @@ -1550,7 +1550,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable // Loop through cells and apply styles for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { - $this->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($col) . $row, $pCellStyle); + $this->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($col - 1) . $row, $pCellStyle); } } diff --git a/changelog.txt b/changelog.txt index 1e943d02..2f5bb06b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -33,6 +33,7 @@ Fixed in develop branch for release v1.8.0: Would also have affected insert/delete column/row - Bugfix: (RomanSyroeshko) Work Item GH-267 - CHOOSE() returns "#VALUE!" if the 1st entry is chosen - Bugfix: (Gemorroj) Work Item GH-268 - When duplicating styles, styles shifted by one column to the right + Fix also applied to duplicating conditional styles - Feature: (amerov) - Implementation of the Excel HLOOKUP() function - Feature: (MBaker) - Added "Quote Prefix" to style settings (Excel2007 Reader and Writer only) - Feature: (MBaker) - Added Horizontal FILL alignment for Excel5 and Excel2007 Readers/Writers, and Horizontal DISTRIBUTED alignment for Excel2007 Reader/Writer