PHPExcel_Calculation

# Class: PHPExcel_Calculation_Logical

Source Location: /PHPExcel/Calculation/Logical.php

### Class Overview

PHPExcel_Calculation_Logical

#### Author(s):

#### Copyright:

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

### Methods

- FALSE
- IFERROR
- LOGICAL_AND
- LOGICAL_OR
- NOT
- STATEMENT_IF
- TRUE

### Class Details

[line 46]
PHPExcel_Calculation_Logical

#### Tags:

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

[ Top ]

### Class Methods

### static method FALSE [line 77]

`static boolean FALSE( )`

FALSE

Returns the boolean FALSE.

Excel Function: =FALSE()

#### Tags:

return: | False
access: | public

[ Top ]

### static method IFERROR [line 281]

`static mixed IFERROR( [mixed $testValue = ''], [mixed $errorpart = ''])`

IFERROR

Excel Function: =IFERROR(testValue,errorpart)

#### Tags:

return: | The value of errorpart or testValue determined by error condition
access: | public

#### Parameters:

mixed | $testValue | Value to check, is also the value returned when no error
mixed | $errorpart | Value to return when testValue is an error condition

[ Top ]

### static method LOGICAL_AND [line 103]

`static boolean LOGICAL_AND( mixed $arg,...)`

LOGICAL_AND

Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.

Excel Function: =AND(logical1[,logical2[, ...]])

The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays or references that contain logical values.

Boolean arguments are treated as True or False as appropriate Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value

#### Tags:

return: | The logical AND of the arguments.
access: | public

#### Parameters:

mixed | $arg,... | Data values

[ Top ]

### static method LOGICAL_OR [line 158]

`static boolean LOGICAL_OR( mixed $arg,...)`

LOGICAL_OR

Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.

Excel Function: =OR(logical1[,logical2[, ...]])

The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays or references that contain logical values.

Boolean arguments are treated as True or False as appropriate Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value

#### Tags:

return: | The logical OR of the arguments.
access: | public

#### Parameters:

mixed | $arg,... | Data values

[ Top ]

### static method NOT [line 212]

`static boolean NOT( [mixed $logical = FALSE])`

NOT

Returns the boolean inverse of the argument.

Excel Function: =NOT(logical)

The argument must evaluate to a logical value such as TRUE or FALSE

Boolean arguments are treated as True or False as appropriate Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value

#### Tags:

return: | The boolean inverse of the argument.
access: | public

#### Parameters:

mixed | $logical | A value or expression that can be evaluated to TRUE or FALSE

[ Top ]

### static method STATEMENT_IF [line 260]

`static mixed STATEMENT_IF( [mixed $condition = TRUE], [mixed $returnIfTrue = 0], [mixed $returnIfFalse = FALSE])`

STATEMENT_IF

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.

Excel Function: =IF(condition[,returnIfTrue[,returnIfFalse]])

Condition is any value or expression that can be evaluated to TRUE or FALSE. For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. This argument can use any comparison calculation operator. ReturnIfTrue is the value that is returned if condition evaluates to TRUE. For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE, then the IF function returns the text "Within budget" If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use the logical value TRUE for this argument. ReturnIfTrue can be another formula. ReturnIfFalse is the value that is returned if condition evaluates to FALSE. For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE, then the IF function returns the text "Over budget". If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned. If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned. ReturnIfFalse can be another formula.

#### Tags:

return: | The value of returnIfTrue or returnIfFalse determined by condition
access: | public

#### Parameters:

mixed | $condition | Condition to evaluate
mixed | $returnIfTrue | Value to return when condition is true
mixed | $returnIfFalse | Optional value to return when condition is false

[ Top ]

### static method TRUE [line 60]

`static boolean TRUE( )`

TRUE

Returns the boolean TRUE.

Excel Function: =TRUE()

#### Tags:

return: | True
access: | public

[ Top ]

Documentation generated on Fri, 12 Oct 2012 00:16:35 +0200 by phpDocumentor 1.4.4