Bugfix: (bobwitlox) Work Item GH-467 - Bug in Excel2003XML reader, parsing merged cells

This commit is contained in:
MarkBaker 2014-11-26 22:24:53 +00:00
parent 184c1bc290
commit 903f737a39
2 changed files with 9 additions and 3 deletions

View File

@ -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']))) { if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) {
$columnTo = $columnID; $columnTo = $columnID;
if (isset($cell_ss['MergeAcross'])) { if (isset($cell_ss['MergeAcross'])) {
$additionalMergedCells = (int)$cell_ss['MergeAcross'];
$columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1); $columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1);
} }
$rowTo = $rowID; $rowTo = $rowID;
@ -759,6 +761,10 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
} }
} }
++$columnID; ++$columnID;
while ($additionalMergedCells > 0) {
++$columnID;
$additionalMergedCells--;
}
} }
if ($rowHasData) { if ($rowHasData) {

View File

@ -34,8 +34,9 @@ Planned for v1.8.1
- Bugfix: (MBaker) - Fix for percentage operator in formulae for BIFF Writer - Bugfix: (MBaker) - Fix for percentage operator in formulae for BIFF Writer
- Bugfix: (MBaker) - Fix to getStyle() call for cell object - 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: (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: (MBaker) - Small performance improvement for autosize columns
- General: (frost-nzcr4) Work Item GH-379 - Change the getter/setter for zeroHeight to camel case - 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 - 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: (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: (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 - 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): 2014-03-02 (v1.8.0):