From 30a5e4b893f3b7c7179711ad36331b2866efcc3c Mon Sep 17 00:00:00 2001 From: Enyby Date: Mon, 10 Oct 2016 21:02:15 +0300 Subject: [PATCH] Fixed bug on load XML with column filter `continue;` break columnID increment. Another problem can be on Merged cells. --- src/PhpSpreadsheet/Reader/Excel2003XML.php | 1 + src/PhpSpreadsheet/Reader/Ods.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/PhpSpreadsheet/Reader/Excel2003XML.php b/src/PhpSpreadsheet/Reader/Excel2003XML.php index 5c4af285..8e9f82f4 100644 --- a/src/PhpSpreadsheet/Reader/Excel2003XML.php +++ b/src/PhpSpreadsheet/Reader/Excel2003XML.php @@ -562,6 +562,7 @@ class Excel2003XML extends BaseReader implements IReader if ($this->getReadFilter() !== null) { if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { + ++$columnID; continue; } } diff --git a/src/PhpSpreadsheet/Reader/Ods.php b/src/PhpSpreadsheet/Reader/Ods.php index 35ac0a19..17cbd116 100644 --- a/src/PhpSpreadsheet/Reader/Ods.php +++ b/src/PhpSpreadsheet/Reader/Ods.php @@ -419,6 +419,7 @@ class Ods extends BaseReader implements IReader foreach ($rowData as $key => $cellData) { if ($this->getReadFilter() !== null) { if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { + ++$columnID; continue; } }