From 903f737a398e1eccaf0e325e1173cb3b9fa8f0de Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Wed, 26 Nov 2014 22:24:53 +0000 Subject: [PATCH] Bugfix: (bobwitlox) Work Item GH-467 - Bug in Excel2003XML reader, parsing merged cells --- Classes/PHPExcel/Reader/Excel2003XML.php | 6 ++++++ changelog.txt | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Classes/PHPExcel/Reader/Excel2003XML.php b/Classes/PHPExcel/Reader/Excel2003XML.php index 6f3a4efd..dbb196d3 100644 --- a/Classes/PHPExcel/Reader/Excel2003XML.php +++ b/Classes/PHPExcel/Reader/Excel2003XML.php @@ -599,9 +599,11 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P } } + $additionalMergedCells = 0; if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) { $columnTo = $columnID; if (isset($cell_ss['MergeAcross'])) { + $additionalMergedCells = (int)$cell_ss['MergeAcross']; $columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1); } $rowTo = $rowID; @@ -759,6 +761,10 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P } } ++$columnID; + while ($additionalMergedCells > 0) { + ++$columnID; + $additionalMergedCells--; + } } if ($rowHasData) { diff --git a/changelog.txt b/changelog.txt index 1af29b2b..a60cea7d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -34,8 +34,9 @@ Planned for v1.8.1 - Bugfix: (MBaker) - Fix for percentage operator in formulae for BIFF Writer - Bugfix: (MBaker) - Fix to getStyle() call for cell object - Bugfix: (MBaker) - Discard Autofilters in Excel2007 Reader when filter range isn't a valid range -- Bugfix: (MBaker) - Discard Autofilters in Excel2007 Reader when filter range isn't a valid range -- Bugfix: (frozenstupidity) Work Item GH-423 - Fix invalid NA return in VLOOKUP +- Bugfix: (frozenstupidity) Work Item GH-423 - Fix invalid NA return in VLOOKUP +- Bugfix: (wiseloren) Work Item CP21454 - "No Impact" conditional formatting fix for NumberFormat +- Bugfix: (bobwitlox) Work Item GH-467 - Bug in Excel2003XML reader, parsing merged cells - General: (MBaker) - Small performance improvement for autosize columns - General: (frost-nzcr4) Work Item GH-379 - Change the getter/setter for zeroHeight to camel case - General: (MBaker) Work Item GH-394 - DefaultValueBinder is too much aggressive when converting string to numeric @@ -45,7 +46,6 @@ Planned for v1.8.1 - Feature: (CQD) Work Item GH-389 - Additional Mac CJK codepage definitions - Feature: (bolovincev) Work Item GH-269 - Update Worksheet.php getStyleByColumnAndRow() to allow a range of cells rather than just a single cell - Feature: (MBaker) - New methods added for testing cell status within merge groups -- Bugfix: (wiseloren) Work Item CP21454 - "No Impact" conditional formatting fix for NumberFormat 2014-03-02 (v1.8.0):