Skip to content

Commit 30a5e4b

Browse files
EnybyPowerKiKi
authored andcommitted
Fixed bug on load XML with column filter
`continue;` break columnID increment. Another problem can be on Merged cells.
1 parent 2484a03 commit 30a5e4b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/PhpSpreadsheet/Reader/Excel2003XML.php

+1
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ public function loadIntoExisting($pFilename, \PhpOffice\PhpSpreadsheet\Spreadshe
562562

563563
if ($this->getReadFilter() !== null) {
564564
if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {
565+
++$columnID;
565566
continue;
566567
}
567568
}

src/PhpSpreadsheet/Reader/Ods.php

+1
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ public function loadIntoExisting($pFilename, \PhpOffice\PhpSpreadsheet\Spreadshe
419419
foreach ($rowData as $key => $cellData) {
420420
if ($this->getReadFilter() !== null) {
421421
if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {
422+
++$columnID;
422423
continue;
423424
}
424425
}

0 commit comments

Comments
 (0)