Constants

PRECISION

PRECISION = 8.88E-16

M_2DIVPI

M_2DIVPI = 0.6366197723675814

2 / PI.

COMPATIBILITY_EXCEL

COMPATIBILITY_EXCEL = 'Excel'

constants

COMPATIBILITY_GNUMERIC

COMPATIBILITY_GNUMERIC = 'Gnumeric'

COMPATIBILITY_OPENOFFICE

COMPATIBILITY_OPENOFFICE = 'OpenOfficeCalc'

RETURNDATE_PHP_NUMERIC

RETURNDATE_PHP_NUMERIC = 'P'

RETURNDATE_UNIX_TIMESTAMP

RETURNDATE_UNIX_TIMESTAMP = 'P'

RETURNDATE_PHP_OBJECT

RETURNDATE_PHP_OBJECT = 'O'

RETURNDATE_PHP_DATETIME_OBJECT

RETURNDATE_PHP_DATETIME_OBJECT = 'O'

RETURNDATE_EXCEL

RETURNDATE_EXCEL = 'E'

Properties

$compatibilityMode

$compatibilityMode : string

Compatibility mode to use for error checking and responses.

Type

string

$returnDateType

$returnDateType : string

Data Type to use when returning date values.

Type

string

$errorCodes

$errorCodes : array

List of error codes.

Type

array

Methods

setCompatibilityMode()

setCompatibilityMode(string  $compatibilityMode) : bool

Set the Compatibility Mode.

Parameters

string $compatibilityMode

Compatibility Mode Permitted values are: Functions::COMPATIBILITY_EXCEL 'Excel' Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc'

Returns

bool —

(Success or Failure)

getCompatibilityMode()

getCompatibilityMode() : string

Return the current Compatibility Mode.

Returns

string —

Compatibility Mode Possible Return values are: Functions::COMPATIBILITY_EXCEL 'Excel' Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc'

setReturnDateType()

setReturnDateType(string  $returnDateType) : bool

Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object).

Parameters

string $returnDateType

Return Date Format Permitted values are: Functions::RETURNDATE_UNIX_TIMESTAMP 'P' Functions::RETURNDATE_PHP_DATETIME_OBJECT 'O' Functions::RETURNDATE_EXCEL 'E'

Returns

bool —

Success or failure

getReturnDateType()

getReturnDateType() : string

Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object).

Returns

string —

Return Date Format Possible Return values are: Functions::RETURNDATE_UNIX_TIMESTAMP 'P' Functions::RETURNDATE_PHP_DATETIME_OBJECT 'O' Functions::RETURNDATE_EXCEL 'E'

DUMMY()

DUMMY() : string

DUMMY.

Returns

string —

#Not Yet Implemented

DIV0()

DIV0() : string

DIV0.

Returns

string —

#Not Yet Implemented

NA()

NA() : string

NA.

Excel Function: =NA()

Returns the error value #N/A #N/A is the error value that means "no value is available."

Returns

string —

#N/A!

NAN()

NAN() : string

NaN.

Returns the error value #NUM!

Returns

string —

#NUM!

NAME()

NAME() : string

NAME.

Returns the error value #NAME?

Returns

string —

#NAME?

REF()

REF() : string

REF.

Returns the error value #REF!

Returns

string —

#REF!

null()

null() : string

NULL.

Returns the error value #NULL!

Returns

string —

#NULL!

VALUE()

VALUE() : string

VALUE.

Returns the error value #VALUE!

Returns

string —

#VALUE!

isMatrixValue()

isMatrixValue(mixed  $idx) : mixed

Parameters

mixed $idx

Returns

mixed —

isValue()

isValue(mixed  $idx) : mixed

Parameters

mixed $idx

Returns

mixed —

isCellValue()

isCellValue(mixed  $idx) : mixed

Parameters

mixed $idx

Returns

mixed —

ifCondition()

ifCondition(mixed  $condition) : mixed

Parameters

mixed $condition

Returns

mixed —

errorType()

errorType(mixed  $value = '') : bool

ERROR_TYPE.

Parameters

mixed $value

Value to check

Returns

bool —

isBlank()

isBlank(mixed  $value = null) : bool

IS_BLANK.

Parameters

mixed $value

Value to check

Returns

bool —

isErr()

isErr(mixed  $value = '') : bool

IS_ERR.

Parameters

mixed $value

Value to check

Returns

bool —

isError()

isError(mixed  $value = '') : bool

IS_ERROR.

Parameters

mixed $value

Value to check

Returns

bool —

isNa()

isNa(mixed  $value = '') : bool

IS_NA.

Parameters

mixed $value

Value to check

Returns

bool —

isEven()

isEven(mixed  $value = null) : bool|string

IS_EVEN.

Parameters

mixed $value

Value to check

Returns

bool|string —

isOdd()

isOdd(mixed  $value = null) : bool|string

IS_ODD.

Parameters

mixed $value

Value to check

Returns

bool|string —

isNumber()

isNumber(mixed  $value = null) : bool

IS_NUMBER.

Parameters

mixed $value

Value to check

Returns

bool —

isLogical()

isLogical(mixed  $value = null) : bool

IS_LOGICAL.

Parameters

mixed $value

Value to check

Returns

bool —

isText()

isText(mixed  $value = null) : bool

IS_TEXT.

Parameters

mixed $value

Value to check

Returns

bool —

isNonText()

isNonText(mixed  $value = null) : bool

IS_NONTEXT.

Parameters

mixed $value

Value to check

Returns

bool —

n()

n(null|mixed  $value = null) : \PhpOffice\PhpSpreadsheet\Calculation\number

N.

Returns a value converted to a number

Parameters

null|mixed $value

The value you want converted

Returns

\PhpOffice\PhpSpreadsheet\Calculation\number —

N converts values listed in the following table If value is or refers to N returns A number That number A date The serial number of that date TRUE 1 FALSE 0 An error value The error value Anything else 0

TYPE()

TYPE(null|mixed  $value = null) : \PhpOffice\PhpSpreadsheet\Calculation\number

TYPE.

Returns a number that identifies the type of a value

Parameters

null|mixed $value

The value you want tested

Returns

\PhpOffice\PhpSpreadsheet\Calculation\number —

N converts values listed in the following table If value is or refers to N returns A number 1 Text 2 Logical Value 4 An error value 16 Array or Matrix 64

flattenArray()

flattenArray(array  $array) : array

Convert a multi-dimensional array to a simple 1-dimensional array.

Parameters

array $array

Array to be flattened

Returns

array —

Flattened array

flattenArrayIndexed()

flattenArrayIndexed(array  $array) : array

Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing.

Parameters

array $array

Array to be flattened

Returns

array —

Flattened array

flattenSingleValue()

flattenSingleValue(mixed  $value = '') : mixed

Convert an array to a single scalar value by extracting the first element.

Parameters

mixed $value

Array or scalar value

Returns

mixed —

isFormula()

isFormula(mixed  $cellReference = '', \PhpOffice\PhpSpreadsheet\Cell\Cell  $pCell = null) : bool|string

ISFORMULA.

Parameters

mixed $cellReference

The cell to check

\PhpOffice\PhpSpreadsheet\Cell\Cell $pCell

The current cell (containing this formula)

Returns

bool|string —

operandSpecialHandling()

operandSpecialHandling(mixed  $operand) : mixed

Parameters

mixed $operand

Returns

mixed —