Documentation

Indirect
in package

Table of Contents

Methods

INDIRECT()  : array<string|int, mixed>|string
INDIRECT.
a1Format()  : bool
Determine whether cell address is in A1 (true) or R1C1 (false) format.
extractRequiredCells()  : array<string|int, mixed>
Extract range values.
handleRowColumnRanges()  : string
validateAddress()  : string
Convert cellAddress to string, verify not null string.

Methods

INDIRECT()

INDIRECT.

public static INDIRECT(array<string|int, mixed>|string $cellAddress, mixed $a1fmt, Cell $cell) : array<string|int, mixed>|string

Returns the reference specified by a text string. References are immediately evaluated to display their contents.

Excel Function: =INDIRECT(cellAddress, bool) where the bool argument is optional

Parameters
$cellAddress : array<string|int, mixed>|string

$cellAddress The cell address of the current cell (containing this formula)

$a1fmt : mixed

Expect bool Helpers::CELLADDRESS_USE_A1 or CELLADDRESS_USE_R1C1, but can be provided as numeric which is cast to bool

$cell : Cell

The current cell (containing this formula)

Return values
array<string|int, mixed>|string

An array containing a cell or range of cells, or a string on error

a1Format()

Determine whether cell address is in A1 (true) or R1C1 (false) format.

private static a1Format(mixed $a1fmt) : bool
Parameters
$a1fmt : mixed

Expect bool Helpers::CELLADDRESS_USE_A1 or CELLADDRESS_USE_R1C1, but can be provided as numeric which is cast to bool

Return values
bool

extractRequiredCells()

Extract range values.

private static extractRequiredCells(Worksheet|null $worksheet, string $cellAddress) : array<string|int, mixed>
Parameters
$worksheet : Worksheet|null
$cellAddress : string
Return values
array<string|int, mixed>

Array of values in range if range contains more than one element. Otherwise, a single value is returned.

handleRowColumnRanges()

private static handleRowColumnRanges(Worksheet|null $worksheet, string $start, string $end) : string
Parameters
$worksheet : Worksheet|null
$start : string
$end : string
Return values
string

validateAddress()

Convert cellAddress to string, verify not null string.

private static validateAddress(array<string|int, mixed>|string|null $cellAddress) : string
Parameters
$cellAddress : array<string|int, mixed>|string|null
Return values
string

        
On this page

Search results