Documentation

RowColumnInformation
in package

Table of Contents

Methods

COLUMN()  : int|array<string|int, int>
COLUMN.
COLUMNS()  : int|string
COLUMNS.
ROW()  : int|array<string|int, mixed>
ROW.
ROWS()  : int|string
ROWS.
cellAddressNullOrWhitespace()  : bool
Test if cellAddress is null or whitespace string.
cellColumn()  : int
cellRow()  : int

Methods

COLUMN()

COLUMN.

public static COLUMN([null|array<string|int, mixed>|string $cellAddress = null ][, Cell|null $cell = null ]) : int|array<string|int, int>

Returns the column number of the given cell reference If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array. If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the reference of the cell in which the COLUMN function appears; otherwise this function returns 1.

Excel Function: =COLUMN([cellAddress])

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

A reference to a range of cells for which you want the column numbers

$cell : Cell|null = null
Return values
int|array<string|int, int>

COLUMNS()

COLUMNS.

public static COLUMNS([null|array<string|int, mixed>|string $cellAddress = null ]) : int|string

Returns the number of columns in an array or reference.

Excel Function: =COLUMNS(cellAddress)

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

An array or array formula, or a reference to a range of cells for which you want the number of columns

Return values
int|string

The number of columns in cellAddress, or a string if arguments are invalid

ROW()

ROW.

public static ROW([null|array<string|int, mixed>|string $cellAddress = null ][, Cell|null $cell = null ]) : int|array<string|int, mixed>

Returns the row number of the given cell reference If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array. If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the reference of the cell in which the ROW function appears; otherwise this function returns 1.

Excel Function: =ROW([cellAddress])

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

A reference to a range of cells for which you want the row numbers

$cell : Cell|null = null
Return values
int|array<string|int, mixed>

ROWS()

ROWS.

public static ROWS([null|array<string|int, mixed>|string $cellAddress = null ]) : int|string

Returns the number of rows in an array or reference.

Excel Function: =ROWS(cellAddress)

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

An array or array formula, or a reference to a range of cells for which you want the number of rows

Return values
int|string

The number of rows in cellAddress, or a string if arguments are invalid

cellAddressNullOrWhitespace()

Test if cellAddress is null or whitespace string.

private static cellAddressNullOrWhitespace(null|array<string|int, mixed>|string $cellAddress) : bool
Parameters
$cellAddress : null|array<string|int, mixed>|string

A reference to a range of cells

Return values
bool

        
On this page

Search results