CALCULATION_REGEXP_NUMBER
CALCULATION_REGEXP_NUMBER = '[-+]?\\d*\\.?\\d+(e[-+]?\\d+)?'
Regular Expressions
PHPExcel_Calculation (Multiton)
Copyright (c) 2006 - 2015 PHPExcel
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
$suppressFormulaErrors : bool
Flag to determine how formula errors should be handled If true, then a user error will be triggered If false, then an exception will be thrown
$formulaError : string
Error message for any error that was raised/thrown by the calculation engine
$cyclicFormulaCount : int
Number of iterations for cyclic formulae
$localeBoolean : string[]
Locale-specific translations for Excel constants (True, False and Null)
$instance : \PHPExcel_Calculation
Instance of this class
$workbook : \PHPExcel
Instance of the workbook this Calculation Engine is using
$workbookSets : \PHPExcel_Calculation[]
List of instances of the calculation engine that we've instantiated for individual workbooks
$calculationCache : array
Calculation cache
$calculationCacheEnabled : bool
Calculation cache enabled
$operators : array
List of operators that can be used within formulae The true/false value indicates whether it is a binary operator or a unary operator
$binaryOperators : array
List of binary operators (those that expect two operands)
$debugLog : \PHPExcel_CalcEngine_Logger
The debug log generated by the calculation engine
$cyclicReferenceStack : array
An array of the nested cell references accessed by the calculation engine, used for the debug log
$cyclicFormulaCounter : int
Current iteration counter for cyclic formulae If the value is 0 (or less) then cyclic formulae will throw an exception, otherwise they will iterate to the limit defined here before returning a result
$delta : float
Epsilon Precision used for comparisons in calculations
$localeLanguage : string
The current locale setting
$validLocaleLanguages : string[]
List of available locale settings Note that this is read for the locale subdirectory only when requested
$localeArgumentSeparator : string
Locale-specific argument separator for function arguments
$excelConstants : string[]
Excel constant string translations to their PHP equivalents Constant conversion from text name/value to actual (datatyped) value
calculateCellValue(\PHPExcel_Cell $pCell = null, bool $resetLog = true) : mixed
Calculate the value of a cell formula
| \PHPExcel_Cell | $pCell | Cell to calculate |
| bool | $resetLog | Flag indicating whether the debug log should be reset or not |
calculateFormula(string $formula, string $cellID = null, \PHPExcel_Cell $pCell = null) : mixed
Calculate the value of a formula
| string | $formula | Formula to parse |
| string | $cellID | Address of the cell to calculate |
| \PHPExcel_Cell | $pCell | Cell to calculate |
_calculateFormulaValue(string $formula, string $cellID = null, \PHPExcel_Cell $pCell = null) : mixed
Parse a cell formula and calculate its value
| string | $formula | The formula to parse and calculate |
| string | $cellID | The ID (e.g. A3) of the cell that we are calculating |
| \PHPExcel_Cell | $pCell | Cell to calculate |
extractCellRange(string $pRange = 'A1', \PHPExcel_Worksheet $pSheet = null, bool $resetLog = true) : mixed
Extract range values
| string | $pRange | String based range representation |
| \PHPExcel_Worksheet | $pSheet | Worksheet |
| bool | $resetLog | Flag indicating whether calculation log should be reset or not |
Array of values in range if range contains more than one element. Otherwise, a single value is returned.
extractNamedRange(string $pRange = 'A1', \PHPExcel_Worksheet $pSheet = null, bool $resetLog = true) : mixed
Extract range values
| string | $pRange | String based range representation |
| \PHPExcel_Worksheet | $pSheet | Worksheet |
| bool | $resetLog | Flag indicating whether calculation log should be reset or not |
Array of values in range if range contains more than one element. Otherwise, a single value is returned.
checkMatrixOperands(mixed $operand1, mixed $operand2, int $resize = 1) : mixed
Ensure that paired matrix operands are both matrices and of the same size
| mixed | $operand1 | First matrix operand |
| mixed | $operand2 | Second matrix operand |
| int | $resize | 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 |
resizeMatricesShrink(mixed $matrix1, mixed $matrix2, int $matrix1Rows, int $matrix1Columns, int $matrix2Rows, int $matrix2Columns) : mixed
Ensure that paired matrix operands are both matrices of the same size
| mixed | $matrix1 | First matrix operand |
| mixed | $matrix2 | Second matrix operand |
| int | $matrix1Rows | Row size of first matrix operand |
| int | $matrix1Columns | Column size of first matrix operand |
| int | $matrix2Rows | Row size of second matrix operand |
| int | $matrix2Columns | Column size of second matrix operand |
resizeMatricesExtend(mixed $matrix1, mixed $matrix2, int $matrix1Rows, int $matrix1Columns, int $matrix2Rows, int $matrix2Columns) : mixed
Ensure that paired matrix operands are both matrices of the same size
| mixed | $matrix1 | First matrix operand |
| mixed | $matrix2 | Second matrix operand |
| int | $matrix1Rows | Row size of first matrix operand |
| int | $matrix1Columns | Column size of first matrix operand |
| int | $matrix2Rows | Row size of second matrix operand |
| int | $matrix2Columns | Column size of second matrix operand |
executeBinaryComparisonOperation(mixed $cellID, mixed $operand1, mixed $operand2, mixed $operation, mixed $stack, mixed $recursingArrays = false) : mixed
| mixed | $cellID | |
| mixed | $operand1 | |
| mixed | $operand2 | |
| mixed | $operation | |
| mixed | $stack | |
| mixed | $recursingArrays |
strcmpLowercaseFirst(string $str1, string $str2) : int
Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters
| string | $str1 | First string value for the comparison |
| string | $str2 | Second string value for the comparison |