\PhpOffice\PhpSpreadsheet\WorksheetRowIterator

Summary

Methods
Properties
Constants
__construct()
__destruct()
resetStart()
resetEnd()
seek()
rewind()
current()
key()
next()
prev()
valid()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$subject
$position
$startRow
$endRow
N/A

Properties

$subject

$subject : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Worksheet to iterate.

Type

Worksheet

$position

$position : int

Current iterator position.

Type

int

$startRow

$startRow : int

Start position.

Type

int

$endRow

$endRow : int

End position.

Type

int

Methods

__construct()

__construct(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $subject, int  $startRow = 1, int  $endRow = null) : mixed

Create a new row iterator.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $subject

The worksheet to iterate over

int $startRow

The row number at which to start iterating

int $endRow

Optionally, the row number at which to stop iterating

Returns

mixed —

__destruct()

__destruct() : mixed

Destructor.

Returns

mixed —

resetStart()

resetStart(int  $startRow = 1) : $this

(Re)Set the start row and the current row pointer.

Parameters

int $startRow

The row number at which to start iterating

Returns

$this —

resetEnd()

resetEnd(int  $endRow = null) : $this

(Re)Set the end row.

Parameters

int $endRow

The row number at which to stop iterating

Returns

$this —

seek()

seek(int  $row = 1) : $this

Set the row pointer to the selected row.

Parameters

int $row

The row number to set the current pointer at

Returns

$this —

rewind()

rewind() : void

Rewind the iterator to the starting row.

current()

current() : \PhpOffice\PhpSpreadsheet\Worksheet\Row

Return the current row in this worksheet.

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\Row —

key()

key() : int

Return the current iterator key.

Returns

int —

next()

next() : void

Set the iterator to its next value.

prev()

prev() : void

Set the iterator to its previous value.

valid()

valid() : bool

Indicate if more rows exist in the worksheet range of rows that we're iterating.

Returns

bool —