From 0947427d9ffb0e428726e71dbf291106cde8e40f Mon Sep 17 00:00:00 2001 From: Mofasa Date: Thu, 30 May 2019 16:42:18 +0800 Subject: [PATCH] Allow to get current iterator position (#980) --- src/PhpSpreadsheet/Worksheet/RowCellIterator.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PhpSpreadsheet/Worksheet/RowCellIterator.php b/src/PhpSpreadsheet/Worksheet/RowCellIterator.php index 59ef329c..8510d402 100644 --- a/src/PhpSpreadsheet/Worksheet/RowCellIterator.php +++ b/src/PhpSpreadsheet/Worksheet/RowCellIterator.php @@ -170,6 +170,16 @@ class RowCellIterator extends CellIterator return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex; } + /** + * Return the current iterator position. + * + * @return int + */ + public function getCurrentColumnIndex() + { + return $this->currentColumnIndex; + } + /** * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. *