PHPExcel_Calculation

# Class: PHPExcel_Calculation_Functions Source Location: /PHPExcel/Calculation/Functions.php
### Class Overview
PHPExcel_Calculation_Functions #### Author(s): #### Copyright: Copyright (c) 2006 - 2012 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 - 2012 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 592]
`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 624]
`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 656]
`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 405]
`static boolean IS_EVEN( [mixed $value = NULL])`
IS_EVEN #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
[ Top ] ### static method IS_LOGICAL [line 455]
`static boolean IS_LOGICAL( [mixed $value = NULL])`
IS_LOGICAL #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
[ Top ] ### static method IS_NA [line 392]
`static boolean IS_NA( [mixed $value = ''])`
IS_NA #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
[ Top ] ### static method IS_NONTEXT [line 481]
`static boolean IS_NONTEXT( [mixed $value = NULL])`
IS_NONTEXT #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
[ Top ] ### static method IS_NUMBER [line 439]
`static boolean IS_NUMBER( [mixed $value = NULL])`
IS_NUMBER #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
[ Top ] ### static method IS_ODD [line 422]
`static boolean IS_ODD( [mixed $value = NULL])`
IS_ODD #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
[ Top ] ### static method IS_TEXT [line 468]
`static boolean IS_TEXT( [mixed $value = NULL])`
IS_TEXT #### Tags:
access: | public
#### Parameters:
mixed | $value | Value to check
[ Top ] ### static method N [line 511]
`static number N( [value $value = NULL])`
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 550]
`static number TYPE( [value $value = NULL])`
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 491]
`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 Fri, 12 Oct 2012 00:24:16 +0200 by phpDocumentor 1.4.4