\PhpOffice\PhpSpreadsheet\WorksheetColumnIterator

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
$worksheet
$currentColumnIndex
$startColumnIndex
$endColumnIndex
N/A

Properties

$worksheet

$worksheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Worksheet to iterate.

Type

Worksheet

$currentColumnIndex

$currentColumnIndex : int

Current iterator position.

Type

int

$startColumnIndex

$startColumnIndex : int

Start position.

Type

int

$endColumnIndex

$endColumnIndex : int

End position.

Type

int

Methods

__construct()

__construct(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $worksheet, string  $startColumn = 'A', string  $endColumn = null) : mixed

Create a new column iterator.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet

The worksheet to iterate over

string $startColumn

The column address at which to start iterating

string $endColumn

Optionally, the column address at which to stop iterating

Returns

mixed —

__destruct()

__destruct() : mixed

Destructor.

Returns

mixed —

resetStart()

resetStart(string  $startColumn = 'A') : $this

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

Parameters

string $startColumn

The column address at which to start iterating

Returns

$this —

resetEnd()

resetEnd(string  $endColumn = null) : $this

(Re)Set the end column.

Parameters

string $endColumn

The column address at which to stop iterating

Returns

$this —

seek()

seek(string  $column = 'A') : $this

Set the column pointer to the selected column.

Parameters

string $column

The column address to set the current pointer at

Returns

$this —

rewind()

rewind() : void

Rewind the iterator to the starting column.

current()

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

Return the current column in this worksheet.

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\Column —

key()

key() : string

Return the current iterator key.

Returns

string —

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 columns exist in the worksheet range of columns that we're iterating.

Returns

bool —