Docs For Class PHPExcel_Calculation_Functions

PHPExcel_Calculation

# Class: PHPExcel_Calculation_Functions

Source Location: /PHPExcel/Calculation/Functions.php

### Class Overview

PHPExcel_Calculation_Functions

#### Author(s):

#### Copyright:

- Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

### Variables

- $compatibilityMode
- $ReturnDateType
- $_errorCodes

### Constants

- COMPATIBILITY_EXCEL
- COMPATIBILITY_GNUMERIC
- COMPATIBILITY_OPENOFFICE
- RETURNDATE_EXCEL
- RETURNDATE_PHP_NUMERIC
- RETURNDATE_PHP_OBJECT

### Methods

- DIV0
- DUMMY
- ERROR_TYPE
- flattenArray
- flattenArrayIndexed
- flattenSingleValue
- getCompatibilityMode
- getReturnDateType
- isCellValue
- isMatrixValue
- isValue
- IS_BLANK
- IS_ERR
- IS_ERROR
- IS_EVEN
- IS_LOGICAL
- IS_NA
- IS_NONTEXT
- IS_NUMBER
- IS_ODD
- IS_TEXT
- N
- NA
- NAME
- NaN
- NULL
- REF
- setCompatibilityMode
- setReturnDateType
- TYPE
- VALUE
- VERSION
- _ifCondition

### Class Details

[line 59]
PHPExcel_Calculation_Functions

#### Tags:

copyright: | Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

[ Top ]

### Class Variables

#### static $compatibilityMode = self::COMPATIBILITY_EXCEL

[line 77]

Compatibility mode to use for error checking and responses

#### Tags:

access: | protected

Type: | string

[ Top ]

#### static $ReturnDateType = self::RETURNDATE_EXCEL

[line 85]

Data Type to use when returning date values

#### Tags:

access: | protected

Type: | string

[ Top ]

#### static $_errorCodes = array( 'null' => '#NULL!',
'divisionbyzero' => '#DIV/0!',
'value' => '#VALUE!',
'reference' => '#REF!',
'name' => '#NAME?',
'num' => '#NUM!',
'na' => '#N/A',
'gettingdata' => '#GETTING_DATA'
)

[line 93]

List of error codes

#### Tags:

access: | protected

Type: | array

[ Top ]

### Class Methods

### static method DIV0 [line 201]

`static string DIV0( )`

DIV0

#### Tags:

return: | #Not Yet Implemented
access: | public

[ Top ]

### static method DUMMY [line 189]

`static string DUMMY( )`

DUMMY

#### Tags:

return: | #Not Yet Implemented
access: | public

[ Top ]

### static method ERROR_TYPE [line 329]

`static boolean ERROR_TYPE( [mixed $value = ''])`

ERROR_TYPE

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method flattenArray [line 588]

`static array flattenArray( array $array)`

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

#### Tags:

return: | Flattened array
access: | public

#### Parameters:

array | $array | Array to be flattened

[ Top ]

### static method flattenArrayIndexed [line 620]

`static array flattenArrayIndexed( array $array)`

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

#### Tags:

return: | Flattened array
access: | public

#### Parameters:

array | $array | Array to be flattened

[ Top ]

### static method flattenSingleValue [line 652]

`static mixed flattenSingleValue( [mixed $value = ''])`

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

#### Tags:

access: | public

#### Parameters:

mixed | $value | Array or scalar value

[ Top ]

### static method getCompatibilityMode [line 138]

`static string getCompatibilityMode( )`

Return the current Compatibility Mode

#### Tags:

return: | Compatibility Mode Possible Return values are: PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel' PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc'
access: | public

[ Top ]

### static method getReturnDateType [line 177]

`static string getReturnDateType( )`

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

#### Tags:

return: | Return Date Format Possible Return values are: PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P' PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O' PHPExcel_Calculation_Functions::RETURNDATE_EXCEL 'E'
access: | public

[ Top ]

### static method isCellValue [line 304]

`static void isCellValue( $idx)`

#### Tags:

access: | public

#### Parameters:

| $idx |

[ Top ]

### static method isMatrixValue [line 294]

`static void isMatrixValue( $idx)`

#### Tags:

access: | public

#### Parameters:

| $idx |

[ Top ]

### static method isValue [line 299]

`static void isValue( $idx)`

#### Tags:

access: | public

#### Parameters:

| $idx |

[ Top ]

### static method IS_BLANK [line 349]

`static boolean IS_BLANK( [mixed $value = null])`

IS_BLANK

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_ERR [line 364]

`static boolean IS_ERR( [mixed $value = ''])`

IS_ERR

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_ERROR [line 377]

`static boolean IS_ERROR( [mixed $value = ''])`

IS_ERROR

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_EVEN [line 403]

`static boolean IS_EVEN( [mixed $value = 0])`

IS_EVEN

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_LOGICAL [line 451]

`static boolean IS_LOGICAL( [mixed $value = true])`

IS_LOGICAL

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_NA [line 390]

`static boolean IS_NA( [mixed $value = ''])`

IS_NA

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_NONTEXT [line 477]

`static boolean IS_NONTEXT( [mixed $value = ''])`

IS_NONTEXT

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_NUMBER [line 435]

`static boolean IS_NUMBER( [mixed $value = 0])`

IS_NUMBER

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_ODD [line 419]

`static boolean IS_ODD( [mixed $value = null])`

IS_ODD

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method IS_TEXT [line 464]

`static boolean IS_TEXT( [mixed $value = ''])`

IS_TEXT

#### Tags:

access: | public

#### Parameters:

mixed | $value | Value to check

[ Top ]

### static method N [line 507]

`static number N( value $value)`

N

Returns a value converted to a number

#### Tags:

return: | 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
access: | public

#### Parameters:

value | $value | The value you want converted

[ Top ]

### static method NA [line 219]

`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."

#### Tags:

return: | #N/A!
access: | public

[ Top ]

### static method NAME [line 247]

`static string NAME( )`

NAME

Returns the error value #NAME?

#### Tags:

return: | #NAME?
access: | public

[ Top ]

### static method NaN [line 233]

`static string NaN( )`

NaN

Returns the error value #NUM!

#### Tags:

return: | #NUM!
access: | public

[ Top ]

### static method NULL [line 275]

`static string NULL( )`

NULL

Returns the error value #NULL!

#### Tags:

return: | #REF!
access: | public

[ Top ]

### static method REF [line 261]

`static string REF( )`

REF

Returns the error value #REF!

#### Tags:

return: | #REF!
access: | public

[ Top ]

### static method setCompatibilityMode [line 116]

`static boolean setCompatibilityMode( string $compatibilityMode)`

Set the Compatibility Mode

#### Tags:

return: | (Success or Failure)
access: | public

#### Parameters:

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

[ Top ]

### static method setReturnDateType [line 155]

`static boolean setReturnDateType( string $returnDateType)`

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

#### Tags:

return: | Success or failure
access: | public

#### Parameters:

string | $returnDateType | Return Date Format Permitted values are: PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P' PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O' PHPExcel_Calculation_Functions::RETURNDATE_EXCEL 'E'

[ Top ]

### static method TYPE [line 546]

`static number TYPE( value $value)`

TYPE

Returns a number that identifies the type of a value

#### Tags:

return: | 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
access: | public

#### Parameters:

value | $value | The value you want tested

[ Top ]

### static method VALUE [line 289]

`static string VALUE( )`

VALUE

Returns the error value #VALUE!

#### Tags:

return: | #VALUE!
access: | public

[ Top ]

### static method VERSION [line 487]

`static string VERSION( )`

VERSION

#### Tags:

return: | Version information
access: | public

[ Top ]

### static method _ifCondition [line 309]

`static void _ifCondition( $condition)`

#### Tags:

access: | public

#### Parameters:

| $condition |

[ Top ]

### Class Constants

#### COMPATIBILITY_EXCEL = 'Excel'

[line 62]

constants
[ Top ]

#### COMPATIBILITY_GNUMERIC = 'Gnumeric'

[line 63]

[ Top ]

#### COMPATIBILITY_OPENOFFICE = 'OpenOfficeCalc'

[line 64]

[ Top ]

#### RETURNDATE_EXCEL = 'E'

[line 68]

[ Top ]

#### RETURNDATE_PHP_NUMERIC = 'P'

[line 66]

[ Top ]

#### RETURNDATE_PHP_OBJECT = 'O'

[line 67]

[ Top ]

Documentation generated on Sun, 27 Feb 2011 16:32:08 -0800 by phpDocumentor 1.4.3