SpreadJS Documentation
COLUMNS
SpreadJS Documentation > Formula Reference > Formula Functions > COLUMNS

This function returns the number of columns in an array.

Syntax

COLUMNS(array)

Arguments

The argument is an array, an array formula, or a range of cells.

Data Types

Accepts cell references or array. Returns numeric data.

Examples

COLUMNS(B6:D12) gives the result 3

COLUMNS(R6C2:R12C4) gives the result 3

COLUMNS($B$8:$H$8) gives the result 7

COLUMNS(R[2]C[1]:R[3]C[8]) gives the result 8

See Also