61 $this->worksheet = null;
76 "Start column ({$startColumn}) is beyond highest column ({$this->worksheet->getHighestColumn()})" 81 if ($this->endColumnIndex < $this->startColumnIndex) {
84 $this->
seek($startColumn);
98 $endColumn = $endColumn ?: $this->worksheet->getHighestColumn();
111 public function seek(
string $column =
'A')
114 if (($column < $this->startColumnIndex) || ($column > $this->endColumnIndex)) {
116 "Column $column is out of range ({$this->startColumnIndex} - {$this->endColumnIndex})" 119 $this->currentColumnIndex = $column;
145 public function key(): string
171 return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >=
$this->startColumnIndex;
current()
Return the current column in this worksheet.
rewind()
Rewind the iterator to the starting column.
resetStart(string $startColumn='A')
(Re)Set the start column and the current column pointer.
next()
Set the iterator to its next value.
valid()
Indicate if more columns exist in the worksheet range of columns that we're iterating.
prev()
Set the iterator to its previous value.
__construct(Worksheet $worksheet, $startColumn='A', $endColumn=null)
Create a new column iterator.
key()
Return the current iterator key.
resetEnd($endColumn=null)
(Re)Set the end column.
static columnIndexFromString($pString)
Column index from string.
static stringFromColumnIndex($columnIndex)
String from column index.
seek(string $column='A')
Set the column pointer to the selected column.