class Functions (View source)

Constants

PRECISION

M_2DIVPI

2 / PI.

COMPATIBILITY_EXCEL

constants

COMPATIBILITY_GNUMERIC

COMPATIBILITY_OPENOFFICE

RETURNDATE_PHP_NUMERIC

RETURNDATE_UNIX_TIMESTAMP

RETURNDATE_PHP_OBJECT

RETURNDATE_PHP_DATETIME_OBJECT

RETURNDATE_EXCEL

Properties

static protected string $compatibilityMode Compatibility mode to use for error checking and responses.
static protected string $returnDateType Data Type to use when returning date values.
static protected array $errorCodes List of error codes.

Methods

static bool
setCompatibilityMode(string $compatibilityMode)

Set the Compatibility Mode.

static string
getCompatibilityMode()

Return the current Compatibility Mode.

static bool
setReturnDateType(string $returnDateType)

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

static string
getReturnDateType()

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

static string
DUMMY()

DUMMY.

static string
DIV0()

DIV0.

static string
NA()

NA.

static string
NAN()

NaN.

static string
NAME()

NAME.

static string
REF()

REF.

static string
null()

NULL.

static string
VALUE()

VALUE.

static 
isMatrixValue($idx)

No description

static 
isValue($idx)

No description

static 
isCellValue($idx)

No description

static 
ifCondition($condition)

No description

static bool
errorType(mixed $value = '')

ERROR_TYPE.

static bool
isBlank(mixed $value = null)

IS_BLANK.

static bool
isErr(mixed $value = '')

IS_ERR.

static bool
isError(mixed $value = '')

IS_ERROR.

static bool
isNa(mixed $value = '')

IS_NA.

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

IS_EVEN.

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

IS_ODD.

static bool
isNumber(mixed $value = null)

IS_NUMBER.

static bool
isLogical(mixed $value = null)

IS_LOGICAL.

static bool
isText(mixed $value = null)

IS_TEXT.

static bool
isNonText(mixed $value = null)

IS_NONTEXT.

static number
n(null|mixed $value = null)

N.

static number
TYPE(null|mixed $value = null)

TYPE.

static array
flattenArray(array $array)

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

static array
flattenArrayIndexed(array $array)

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

static mixed
flattenSingleValue(mixed $value = '')

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

static bool|string
isFormula(mixed $cellReference = '', Cell $pCell = null)

ISFORMULA.

Details

static bool setCompatibilityMode(string $compatibilityMode)

Set the Compatibility Mode.

Parameters

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

Return Value

bool (Success or Failure)

static string getCompatibilityMode()

Return the current Compatibility Mode.

Return Value

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

static bool setReturnDateType(string $returnDateType)

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'

Return Value

bool Success or failure

static string getReturnDateType()

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

Return Value

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

static string DUMMY()

DUMMY.

Return Value

string

Not Yet Implemented

static string DIV0()

DIV0.

Return Value

string

Not Yet Implemented

static string NA()

NA.

Excel Function: =NA()

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

Return Value

string

N/A!

static string NAN()

NaN.

Returns the error value #NUM!

Return Value

string

NUM!

static string NAME()

NAME.

Returns the error value #NAME?

Return Value

string

NAME?

static string REF()

REF.

Returns the error value #REF!

Return Value

string

REF!

static string null()

NULL.

Returns the error value #NULL!

Return Value

string

NULL!

static string VALUE()

VALUE.

Returns the error value #VALUE!

Return Value

string

VALUE!

static isMatrixValue($idx)

Parameters

$idx

static isValue($idx)

Parameters

$idx

static isCellValue($idx)

Parameters

$idx

static ifCondition($condition)

Parameters

$condition

static bool errorType(mixed $value = '')

ERROR_TYPE.

Parameters

mixed $value Value to check

Return Value

bool

static bool isBlank(mixed $value = null)

IS_BLANK.

Parameters

mixed $value Value to check

Return Value

bool

static bool isErr(mixed $value = '')

IS_ERR.

Parameters

mixed $value Value to check

Return Value

bool

static bool isError(mixed $value = '')

IS_ERROR.

Parameters

mixed $value Value to check

Return Value

bool

static bool isNa(mixed $value = '')

IS_NA.

Parameters

mixed $value Value to check

Return Value

bool

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

IS_EVEN.

Parameters

mixed $value Value to check

Return Value

bool|string

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

IS_ODD.

Parameters

mixed $value Value to check

Return Value

bool|string

static bool isNumber(mixed $value = null)

IS_NUMBER.

Parameters

mixed $value Value to check

Return Value

bool

static bool isLogical(mixed $value = null)

IS_LOGICAL.

Parameters

mixed $value Value to check

Return Value

bool

static bool isText(mixed $value = null)

IS_TEXT.

Parameters

mixed $value Value to check

Return Value

bool

static bool isNonText(mixed $value = null)

IS_NONTEXT.

Parameters

mixed $value Value to check

Return Value

bool

static number n(null|mixed $value = null)

N.

Returns a value converted to a number

Parameters

null|mixed $value The value you want converted

Return Value

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

static number TYPE(null|mixed $value = null)

TYPE.

Returns a number that identifies the type of a value

Parameters

null|mixed $value The value you want tested

Return Value

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

static array flattenArray(array $array)

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

Parameters

array $array Array to be flattened

Return Value

array Flattened array

static array flattenArrayIndexed(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

Return Value

array Flattened array

static mixed flattenSingleValue(mixed $value = '')

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

Parameters

mixed $value Array or scalar value

Return Value

mixed

static bool|string isFormula(mixed $cellReference = '', Cell $pCell = null)

ISFORMULA.

Parameters

mixed $cellReference The cell to check
Cell $pCell The current cell (containing this formula)

Return Value

bool|string