|
| | __construct (Worksheet $worksheet, int $rowIndex=1, string $startColumn='A', ?string $endColumn=null, bool $iterateOnlyExistingCells=false) |
| | Create a new column iterator.
|
| |
| | current () |
| | Return the current cell in this worksheet row.
|
| |
|
| getCurrentColumnIndex () |
| | Return the current iterator position.
|
| |
|
| getIfNotExists () |
| |
|
| getIterateOnlyExistingCells () |
| | Get loop only existing cells.
|
| |
| | key () |
| | Return the current iterator key.
|
| |
| | next () |
| | Set the iterator to its next value.
|
| |
|
| prev () |
| | Set the iterator to its previous value.
|
| |
| | resetEnd (?string $endColumn=null) |
| | (Re)Set the end column.
|
| |
| | resetStart (string $startColumn='A') |
| | (Re)Set the start column and the current column pointer.
|
| |
| | rewind () |
| | Rewind the iterator to the starting column.
|
| |
| | seek (string $column='A') |
| | Set the column pointer to the selected column.
|
| |
|
| setIfNotExists (bool $ifNotExists=self::IF_NOT_EXISTS_CREATE_NEW) |
| |
|
| setIterateOnlyExistingCells (bool $value) |
| | Set the iterator to loop only existing cells.
|
| |
| | valid () |
| | Indicate if more columns exist in the worksheet range of columns that we're iterating.
|
| |
|
|
const | IF_NOT_EXISTS_CREATE_NEW = true |
| |
|
const | IF_NOT_EXISTS_RETURN_NULL = false |
| |
|
const | TREAT_EMPTY_STRING_AS_EMPTY_CELL = 2 |
| |
|
const | TREAT_NULL_VALUE_AS_EMPTY_CELL = 1 |
| |
|
|
Cells | $cellCollection |
| | Cell Collection to iterate.
|
| |
|
bool | $ifNotExists = self::IF_NOT_EXISTS_CREATE_NEW |
| | If iterating all cells, and a cell doesn't exist, identifies whether a new cell should be created, or if the iterator should return a null value.
|
| |
|
bool | $onlyExistingCells = false |
| | Iterate only existing cells.
|
| |
|
Worksheet | $worksheet |
| | Worksheet to iterate.
|
| |
◆ __construct()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::__construct |
( |
Worksheet | $worksheet, |
|
|
int | $rowIndex = 1, |
|
|
string | $startColumn = 'A', |
|
|
?string | $endColumn = null, |
|
|
bool | $iterateOnlyExistingCells = false ) |
Create a new column iterator.
- Parameters
-
| Worksheet | $worksheet | The worksheet to iterate over |
| int | $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 |
◆ adjustForExistingOnlyRange()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::adjustForExistingOnlyRange |
( |
| ) |
|
|
protected |
◆ current()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::current |
( |
| ) |
|
◆ key()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::key |
( |
| ) |
|
◆ next()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::next |
( |
| ) |
|
◆ resetEnd()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::resetEnd |
( |
?string | $endColumn = null | ) |
|
(Re)Set the end column.
- Parameters
-
| ?string | $endColumn | The column address at which to stop iterating |
- Return values
-
◆ resetStart()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::resetStart |
( |
string | $startColumn = 'A' | ) |
|
(Re)Set the start column and the current column pointer.
- Parameters
-
| string | $startColumn | The column address at which to start iterating |
- Return values
-
◆ rewind()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::rewind |
( |
| ) |
|
◆ seek()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::seek |
( |
string | $column = 'A' | ) |
|
Set the column pointer to the selected column.
- Parameters
-
| string | $column | The column address to set the current pointer at |
- Return values
-
◆ valid()
| PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::valid |
( |
| ) |
|
The documentation for this class was generated from the following file:
- lib/phpspreadsheet/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php