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_PHP_OBJECT

RETURNDATE_PHP_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) : boolean

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

boolean —

(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) : boolean

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_PHP_NUMERIC 'P' Functions::RETURNDATE_PHP_OBJECT 'O' Functions::RETURNDATE_EXCEL 'E'

Returns

boolean —

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_PHP_NUMERIC 'P' Functions::RETURNDATE_PHP_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(  $idx) 

Parameters

$idx

isValue()

isValue(  $idx) 

Parameters

$idx

isCellValue()

isCellValue(  $idx) 

Parameters

$idx

ifCondition()

ifCondition(  $condition) 

Parameters

$condition

errorType()

errorType(mixed  $value = '') : boolean

ERROR_TYPE.

Parameters

mixed $value

Value to check

Returns

boolean

isBlank()

isBlank(mixed  $value = null) : boolean

IS_BLANK.

Parameters

mixed $value

Value to check

Returns

boolean

isErr()

isErr(mixed  $value = '') : boolean

IS_ERR.

Parameters

mixed $value

Value to check

Returns

boolean

isError()

isError(mixed  $value = '') : boolean

IS_ERROR.

Parameters

mixed $value

Value to check

Returns

boolean

isNa()

isNa(mixed  $value = '') : boolean

IS_NA.

Parameters

mixed $value

Value to check

Returns

boolean

isEven()

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

IS_EVEN.

Parameters

mixed $value

Value to check

Returns

boolean|string

isOdd()

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

IS_ODD.

Parameters

mixed $value

Value to check

Returns

boolean|string

isNumber()

isNumber(mixed  $value = null) : boolean

IS_NUMBER.

Parameters

mixed $value

Value to check

Returns

boolean

isLogical()

isLogical(mixed  $value = null) : boolean

IS_LOGICAL.

Parameters

mixed $value

Value to check

Returns

boolean

isText()

isText(mixed  $value = null) : boolean

IS_TEXT.

Parameters

mixed $value

Value to check

Returns

boolean

isNonText()

isNonText(mixed  $value = null) : boolean

IS_NONTEXT.

Parameters

mixed $value

Value to check

Returns

boolean

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) : boolean|string

ISFORMULA.

Parameters

mixed $cellReference

The cell to check

\PhpOffice\PhpSpreadsheet\Cell\Cell $pCell

The current cell (containing this formula)

Returns

boolean|string