\PHPExcel_Worksheet_RowCellIterator

PHPExcel_Worksheet_RowCellIterator

Used to iterate columns in a PHPExcel_Worksheet

Summary

Methods
Properties
Constants
__destruct()
getIterateOnlyExistingCells()
setIterateOnlyExistingCells()
__construct()
resetStart()
resetEnd()
seek()
rewind()
current()
key()
next()
prev()
valid()
No public properties found
No constants found
adjustForExistingOnlyRange()
$_subject
$_position
$_onlyExistingCells
$_rowIndex
$_startColumn
$_endColumn
N/A
No private methods found
No private properties found
N/A

Properties

$_subject

$_subject : \PHPExcel_Worksheet

PHPExcel_Worksheet to iterate

Type

\PHPExcel_Worksheet

$_position

$_position : mixed

Current iterator position

Type

mixed

$_onlyExistingCells

$_onlyExistingCells : boolean

Iterate only existing cells

Type

boolean

$_rowIndex

$_rowIndex : integer

Row index

Type

integer

$_startColumn

$_startColumn : integer

Start position

Type

integer

$_endColumn

$_endColumn : integer

End position

Type

integer

Methods

__destruct()

__destruct() 

Destructor

getIterateOnlyExistingCells()

getIterateOnlyExistingCells() : boolean

Get loop only existing cells

Returns

boolean

setIterateOnlyExistingCells()

setIterateOnlyExistingCells(boolean  $value = true) 

Set the iterator to loop only existing cells

Parameters

boolean $value

Throws

\PHPExcel_Exception

__construct()

__construct(\PHPExcel_Worksheet  $subject = null, integer  $rowIndex = 1, string  $startColumn = 'A', string  $endColumn = null) 

Create a new column iterator

Parameters

\PHPExcel_Worksheet $subject

The worksheet to iterate over

integer $rowIndex

The row that we want to iterate

string $startColumn

The column address at which to start iterating

string $endColumn

Optionally, the column address at which to stop iterating

resetStart()

resetStart(integer  $startColumn = 'A') : \PHPExcel_Worksheet_RowCellIterator

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

Parameters

integer $startColumn

The column address at which to start iterating

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_RowCellIterator

resetEnd()

resetEnd(string  $endColumn = null) : \PHPExcel_Worksheet_RowCellIterator

(Re)Set the end column

Parameters

string $endColumn

The column address at which to stop iterating

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_RowCellIterator

seek()

seek(string  $column = 'A') : \PHPExcel_Worksheet_RowCellIterator

Set the column pointer to the selected column

Parameters

string $column

The column address to set the current pointer at

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_RowCellIterator

rewind()

rewind() 

Rewind the iterator to the starting column

current()

current() : \PHPExcel_Cell

Return the current cell in this worksheet row

Returns

\PHPExcel_Cell

key()

key() : string

Return the current iterator key

Returns

string

next()

next() 

Set the iterator to its next value

prev()

prev() 

Set the iterator to its previous value

Throws

\PHPExcel_Exception

valid()

valid() : boolean

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

Returns

boolean

adjustForExistingOnlyRange()

adjustForExistingOnlyRange() 

Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary

Throws

\PHPExcel_Exception