From d2b0ef2ad97d1075e7794f931ff1a3f93df88b2a Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Sun, 26 Apr 2015 17:37:48 +0100 Subject: [PATCH] Pass arguments from Row to RowCellIterator and from Column to ColumnCellIterator --- Classes/PHPExcel/Worksheet/Column.php | 6 ++++-- Classes/PHPExcel/Worksheet/Row.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Classes/PHPExcel/Worksheet/Column.php b/Classes/PHPExcel/Worksheet/Column.php index a251f39..94af213 100644 --- a/Classes/PHPExcel/Worksheet/Column.php +++ b/Classes/PHPExcel/Worksheet/Column.php @@ -82,9 +82,11 @@ class PHPExcel_Worksheet_Column /** * Get cell iterator * + * @param integer $startRow The row number at which to start iterating + * @param integer $endRow Optionally, the row number at which to stop iterating * @return PHPExcel_Worksheet_CellIterator */ - public function getCellIterator() { - return new PHPExcel_Worksheet_ColumnCellIterator($this->_parent, $this->_columnIndex); + public function getCellIterator($startRow = 1, $endRow = null) { + return new PHPExcel_Worksheet_ColumnCellIterator($this->_parent, $this->_columnIndex, $startRow, $endRow); } } diff --git a/Classes/PHPExcel/Worksheet/Row.php b/Classes/PHPExcel/Worksheet/Row.php index 32b63ce..3304327 100644 --- a/Classes/PHPExcel/Worksheet/Row.php +++ b/Classes/PHPExcel/Worksheet/Row.php @@ -82,9 +82,11 @@ class PHPExcel_Worksheet_Row /** * Get cell iterator * + * @param string $startColumn The column address at which to start iterating + * @param string $endColumn Optionally, the column address at which to stop iterating * @return PHPExcel_Worksheet_CellIterator */ - public function getCellIterator() { - return new PHPExcel_Worksheet_RowCellIterator($this->_parent, $this->_rowIndex); + public function getCellIterator($startColumn = 'A', $endColumn = null) { + return new PHPExcel_Worksheet_RowCellIterator($this->_parent, $this->_rowIndex, $startColumn, $endColumn); } }