category |
PHPExcel |
package |
PHPExcel_Calculation |
copyright |
Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) |
Methods
__clone implementation.
__clone()
Cloning should not be allowed in a Singleton!
Exceptions
__destruct()
__destruct()
Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0
_getMatrixDimensions(mixed $matrix) : array
Static
Parameters
$matrix
mixed
&$matrix matrix operand
Returns
array
An array comprising the number of rows, and number of columns
_localeFunc()
_localeFunc($function)
Static
_translateSeparator()
_translateSeparator($fromSeparator, $toSeparator, $formula, $inBraces)
Static
Parameters
$fromSeparator
$toSeparator
$formula
$inBraces
Remove quotes used as a wrapper to identify string values
_unwrapResult(mixed $value) : mixed
Static
Parameters
$value
mixed
Returns
mixed
Wrap string values in quotes
_wrapResult(mixed $value) : mixed
Static
Parameters
$value
mixed
Returns
mixed
Calculate cell value (using formula from a cell ID)
Retained for backward compatibility
calculate(\PHPExcel_Cell $pCell) : mixed
Parameters
Exceptions
Returns
mixed
Calculate the value of a cell formula
calculateCellValue(\PHPExcel_Cell $pCell, Boolean $resetLog) : mixed
Parameters
$resetLog
Boolean
Flag indicating whether the debug log should be reset or not
Exceptions
Returns
mixed
Clear calculation cache
clearCalculationCache()
Clear calculation cache for a specified worksheet
clearCalculationCacheForWorksheet(string $worksheetName)
Parameters
$worksheetName
string
Disable calculation cache
disableCalculationCache()
Enable calculation cache
enableCalculationCache()
Flush the calculation cache for any existing instance of this class
but only if a PHPExcel_Calculation instance exists
flushInstance() : null
Return the Array Return Type (Array or Value of first element in the array)
getArrayReturnType() : string
Static
Returns
string
$returnType Array return type
Is calculation caching enabled?
getCalculationCacheEnabled() : boolean
Return the locale-specific translation of FALSE
getFALSE() : string
Static
Returns
string
locale-specific translation of FALSE
Get an instance of this class
getInstance(\PHPExcel $workbook) : \PHPExcel_Calculation
Static
Parameters
$workbook
\PHPExcel
Injected workbook for working with a PHPExcel object,
or NULL to create a standalone claculation engine
Returns
Get the currently defined locale code
getLocale() : string
Return the locale-specific translation of TRUE
getTRUE() : string
Static
Returns
string
locale-specific translation of TRUE
getValueFromCache()
getValueFromCache($worksheetName, $cellID, $cellValue)
Parameters
$worksheetName
$cellID
$cellValue
Is a specific function implemented?
isImplemented(string $pFunction) : boolean
Parameters
$pFunction
string
Function Name
Returns
boolean
Get a list of all Excel function names
listAllFunctionNames() : array
Get a list of implemented Excel function names
listFunctionNames() : array
Get a list of all implemented functions as an array of function objects
listFunctions() : array
Returns
array
of PHPExcel_Calculation_Function
Rename calculation cache for a specified worksheet
renameCalculationCacheForWorksheet(string $fromWorksheetName, string $toWorksheetName)
Parameters
$fromWorksheetName
string
$toWorksheetName
string
saveValueToCache()
saveValueToCache($worksheetName, $cellID, $cellValue)
Parameters
$worksheetName
$cellID
$cellValue
Set the Array Return Type (Array or Value of first element in the array)
setArrayReturnType(string $returnType) : boolean
Static
Parameters
$returnType
string
Array return type
Returns
boolean
Success or failure
Enable/disable calculation cache
setCalculationCacheEnabled(boolean $pValue)
Parameters
$pValue
boolean
Set the locale code
setLocale(string $locale) : boolean
Parameters
$locale
string
The locale to use for formula translation
Returns
boolean
Unset an instance of this class
unsetInstance(\PHPExcel $workbook)
Static
Parameters
$workbook
\PHPExcel
Injected workbook identifying the instance to unset
__construct()
__construct(\PHPExcel $workbook)
Ensure that paired matrix operands are both matrices and of the same size
_checkMatrixOperands(mixed $operand1, mixed $operand2, integer $resize)
Static
Parameters
$operand1
mixed
&$operand1 First matrix operand
$operand2
mixed
&$operand2 Second matrix operand
$resize
integer
Flag indicating whether the matrices should be resized to match
and (if so), whether the smaller dimension should grow or the
larger should shrink.
0 = no resize
1 = shrink to fit
2 = extend to fit
_convertMatrixReferences()
_convertMatrixReferences($formula)
Static
_dataTestReference()
_dataTestReference($operandData)
Static
_executeBinaryComparisonOperation()
_executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, $stack, $recursingArrays)
Parameters
$cellID
$operand1
$operand2
$operation
$stack
$recursingArrays
_executeNumericBinaryOperation()
_executeNumericBinaryOperation($cellID, $operand1, $operand2, $operation, $matrixFunction, $stack)
Parameters
$cellID
$operand1
$operand2
$operation
$matrixFunction
$stack
_loadLocales()
_loadLocales()
Static
_mkMatrix()
_mkMatrix()
Static
_processTokenStack()
_processTokenStack($tokens, $cellID, \PHPExcel_Cell $pCell)
Parameters
$tokens
$cellID
$pCell
Ensure that paired matrix operands are both matrices of the same size
_resizeMatricesExtend(mixed $matrix1, mixed $matrix2, integer $matrix1Rows, integer $matrix1Columns, integer $matrix2Rows, integer $matrix2Columns)
Static
Parameters
$matrix1
mixed
&$matrix1 First matrix operand
$matrix2
mixed
&$matrix2 Second matrix operand
$matrix1Rows
integer
Row size of first matrix operand
$matrix1Columns
integer
Column size of first matrix operand
$matrix2Rows
integer
Row size of second matrix operand
$matrix2Columns
integer
Column size of second matrix operand
Ensure that paired matrix operands are both matrices of the same size
_resizeMatricesShrink(mixed $matrix1, mixed $matrix2, integer $matrix1Rows, integer $matrix1Columns, integer $matrix2Rows, integer $matrix2Columns)
Static
Parameters
$matrix1
mixed
&$matrix1 First matrix operand
$matrix2
mixed
&$matrix2 Second matrix operand
$matrix1Rows
integer
Row size of first matrix operand
$matrix1Columns
integer
Column size of first matrix operand
$matrix2Rows
integer
Row size of second matrix operand
$matrix2Columns
integer
Column size of second matrix operand
Format type and details of an operand for display in the log (based on operand type)
_showTypeDetails(mixed $value) : mixed
Parameters
$value
mixed
First matrix operand
Returns
mixed
Format details of an operand for display in the log (based on operand type)
_showValue(mixed $value) : mixed
Parameters
$value
mixed
First matrix operand
Returns
mixed
_validateBinaryOperand()
_validateBinaryOperand($cellID, $operand, $stack)
Parameters
$cellID
$operand
$stack
Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters
strcmpLowercaseFirst(string $str1, string $str2) : integer
Parameters
$str1
string
$str2
string
Returns
integer
Properties
$_localeBoolean : string[]
$_ExcelConstants : string[]
$_binaryOperators : array
$_calculationCache : array
$_calculationCacheEnabled : boolean
$_cyclicReferenceStack : array
$_localeArgumentSeparator : string
$_localeLanguage : string
$_savedPrecision : integer
$_validLocaleLanguages : string[]
$functionReplaceFromExcel
$functionReplaceFromLocale
Constants
CALCULATION_REGEXP_CELLREF
CALCULATION_REGEXP_CELLREF
CALCULATION_REGEXP_ERROR
CALCULATION_REGEXP_ERROR
CALCULATION_REGEXP_FUNCTION
CALCULATION_REGEXP_FUNCTION
CALCULATION_REGEXP_NAMEDRANGE
CALCULATION_REGEXP_NAMEDRANGE
CALCULATION_REGEXP_NUMBER
CALCULATION_REGEXP_NUMBER
CALCULATION_REGEXP_OPENBRACE
CALCULATION_REGEXP_OPENBRACE
CALCULATION_REGEXP_STRING
CALCULATION_REGEXP_STRING
RETURN_ARRAY_AS_ARRAY
RETURN_ARRAY_AS_ARRAY
constants
RETURN_ARRAY_AS_ERROR
RETURN_ARRAY_AS_VALUE
RETURN_ARRAY_AS_VALUE