From 46eabbad603820d1c6ec42132cd37407a99a63cd Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 1 Aug 2018 10:45:12 +0100 Subject: [PATCH] Rowspans/colspans were incorrect when adding worksheet using loadIntoExisting Rowspans/colspans are now respected for each HTML document added to an existing spreadsheet as a new worksheet. The protected $rowspan class property should be emptied on each call to `loadIntoExisting`. Fixes #619 Fixes #620 --- CHANGELOG.md | 1 + src/PhpSpreadsheet/Reader/Html.php | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 803f974a..5e9c6fad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Chained operations on cell ranges involving borders operated on last cell only [#428](https://github.com/PHPOffice/PhpSpreadsheet/issues/428) - Avoid memory exhaustion when cloning worksheet with a drawing [#437](https://github.com/PHPOffice/PhpSpreadsheet/issues/437) - Migration tool keep variables containing $PHPExcel untouched [#598](https://github.com/PHPOffice/PhpSpreadsheet/issues/598) +- Rowspans/colspans were incorrect when adding worksheet using loadIntoExisting [#619](https://github.com/PHPOffice/PhpSpreadsheet/issues/619) ## [1.3.1] - 2018-06-12 diff --git a/src/PhpSpreadsheet/Reader/Html.php b/src/PhpSpreadsheet/Reader/Html.php index 9d44c8c1..b570fa4a 100644 --- a/src/PhpSpreadsheet/Reader/Html.php +++ b/src/PhpSpreadsheet/Reader/Html.php @@ -554,6 +554,7 @@ class Html extends BaseReader $row = 0; $column = 'A'; $content = ''; + $this->rowspan = []; $this->processDomElement($dom, $spreadsheet->getActiveSheet(), $row, $column, $content); // Return