Documentation

Row
in package

Table of Contents

Properties

$rowIndex  : int
Row index.
$worksheet  : Worksheet

Methods

__construct()  : mixed
Create a new row.
__destruct()  : mixed
Destructor.
getCellIterator()  : RowCellIterator
Get cell iterator.
getColumnIterator()  : RowCellIterator
Get column iterator. Synonym for getCellIterator().
getRowIndex()  : int
Get row index.
getWorksheet()  : Worksheet
Returns bound worksheet.
isEmpty()  : bool
Returns a boolean true if the row contains no cells. By default, this means that no cell records exist in the collection for this row. false will be returned otherwise.

Properties

$rowIndex

Row index.

private int $rowIndex

Methods

__construct()

Create a new row.

public __construct(Worksheet $worksheet[, int $rowIndex = 1 ]) : mixed
Parameters
$worksheet : Worksheet
$rowIndex : int = 1

__destruct()

Destructor.

public __destruct() : mixed

getCellIterator()

Get cell iterator.

public getCellIterator([string $startColumn = 'A' ][, string|null $endColumn = null ][, bool $iterateOnlyExistingCells = false ]) : RowCellIterator
Parameters
$startColumn : string = 'A'

The column address at which to start iterating

$endColumn : string|null = null

Optionally, the column address at which to stop iterating

$iterateOnlyExistingCells : bool = false
Return values
RowCellIterator

getColumnIterator()

Get column iterator. Synonym for getCellIterator().

public getColumnIterator([string $startColumn = 'A' ][, string|null $endColumn = null ][, bool $iterateOnlyExistingCells = false ]) : RowCellIterator
Parameters
$startColumn : string = 'A'

The column address at which to start iterating

$endColumn : string|null = null

Optionally, the column address at which to stop iterating

$iterateOnlyExistingCells : bool = false
Return values
RowCellIterator

getRowIndex()

Get row index.

public getRowIndex() : int
Return values
int

isEmpty()

Returns a boolean true if the row contains no cells. By default, this means that no cell records exist in the collection for this row. false will be returned otherwise.

public isEmpty([int $definitionOfEmptyFlags = 0 ][, string $startColumn = 'A' ][, string|null $endColumn = null ]) : bool

This rule can be modified by passing a $definitionOfEmptyFlags value: 1 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL If the only cells in the collection are null value cells, then the row will be considered empty. 2 - CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are empty string value cells, then the row will be considered empty. 3 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are null value or empty string value cells, then the row will be considered empty.

Parameters
$definitionOfEmptyFlags : int = 0

Possible Flag Values are: CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL

$startColumn : string = 'A'

The column address at which to start checking if cells are empty

$endColumn : string|null = null

Optionally, the column address at which to stop checking if cells are empty

Return values
bool

        
On this page

Search results