\PHPExcel_Worksheet_ColumnCellIterator

PHPExcel_Worksheet_ColumnCellIterator

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
$_columnIndex
$_startRow
$_endRow
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

$_columnIndex

$_columnIndex : string

Column index

Type

string

$_startRow

$_startRow : integer

Start position

Type

integer

$_endRow

$_endRow : 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, string  $columnIndex, integer  $startRow = 1, integer  $endRow = null) 

Create a new row iterator

Parameters

\PHPExcel_Worksheet $subject

The worksheet to iterate over

string $columnIndex

The column that we want to iterate

integer $startRow

The row number at which to start iterating

integer $endRow

Optionally, the row number at which to stop iterating

resetStart()

resetStart(integer  $startRow = 1) : \PHPExcel_Worksheet_ColumnCellIterator

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

Parameters

integer $startRow

The row number at which to start iterating

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_ColumnCellIterator

resetEnd()

resetEnd(integer  $endRow = null) : \PHPExcel_Worksheet_ColumnCellIterator

(Re)Set the end row

Parameters

integer $endRow

The row number at which to stop iterating

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_ColumnCellIterator

seek()

seek(integer  $row = 1) : \PHPExcel_Worksheet_ColumnCellIterator

Set the row pointer to the selected row

Parameters

integer $row

The row number to set the current pointer at

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_ColumnCellIterator

rewind()

rewind() 

Rewind the iterator to the starting row

current()

current() : \PHPExcel_Worksheet_Row

Return the current cell in this worksheet column

Returns

\PHPExcel_Worksheet_Row

key()

key() : integer

Return the current iterator key

Returns

integer

next()

next() 

Set the iterator to its next value

prev()

prev() 

Set the iterator to its previous value

valid()

valid() : boolean

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

Returns

boolean

adjustForExistingOnlyRange()

adjustForExistingOnlyRange() 

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

Throws

\PHPExcel_Exception