CALCULATION_REGEXP_NUMBER
CALCULATION_REGEXP_NUMBER = '[-+]?\d*\.?\d+(e[-+]?\d+)?'
PHPExcel_Calculation (Multiton)
$_instance : \PHPExcel_Calculation
Instance of this class
$_workbook : \PHPExcel
Instance of the workbook this Calculation Engine is using
$_workbookSets : array<mixed,\PHPExcel_Calculation>
List of instances of the calculation engine that we've instantiated for individual workbooks
$debugLog : \PHPExcel_CalcEngine_Logger
The debug log generated by the calculation engine
getInstance(\PHPExcel $workbook = NULL) : \PHPExcel_Calculation
Get an instance of this class
\PHPExcel | $workbook | Injected workbook for working with a PHPExcel object, or NULL to create a standalone claculation engine |
unsetInstance(\PHPExcel $workbook = NULL)
Unset an instance of this class
\PHPExcel | $workbook | Injected workbook identifying the instance to unset |
getDebugLog() : \PHPExcel_CalcEngine_Logger
Get the debuglog for this claculation engine instance
calculate(\PHPExcel_Cell $pCell = NULL) : mixed
Calculate cell value (using formula from a cell ID) Retained for backward compatibility
\PHPExcel_Cell | $pCell | Cell to calculate |
calculateCellValue(\PHPExcel_Cell $pCell = NULL, Boolean $resetLog = TRUE) : mixed
Calculate the value of a cell formula
\PHPExcel_Cell | $pCell | Cell to calculate |
Boolean | $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( $pRange = 'A1', \PHPExcel_Worksheet $pSheet = NULL, boolean $resetLog = TRUE) : mixed
Extract range values
$pRange | ||
\PHPExcel_Worksheet | $pSheet | Worksheet |
boolean | $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( $pRange = 'A1', \PHPExcel_Worksheet $pSheet = NULL, boolean $resetLog = TRUE) : mixed
Extract range values
$pRange | ||
\PHPExcel_Worksheet | $pSheet | Worksheet |
boolean | $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.
__construct(\PHPExcel $workbook = NULL)
\PHPExcel | $workbook |
_checkMatrixOperands( $operand1, $operand2, integer $resize = 1)
Ensure that paired matrix operands are both matrices and of the same size
$operand1 | ||
$operand2 | ||
integer | $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( $matrix1, $matrix2, integer $matrix1Rows, integer $matrix1Columns, integer $matrix2Rows, integer $matrix2Columns)
Ensure that paired matrix operands are both matrices of the same size
$matrix1 | ||
$matrix2 | ||
integer | $matrix1Rows | Row size of first matrix operand |
integer | $matrix1Columns | Column size of first matrix operand |
integer | $matrix2Rows | Row size of second matrix operand |
integer | $matrix2Columns | Column size of second matrix operand |
_resizeMatricesExtend( $matrix1, $matrix2, integer $matrix1Rows, integer $matrix1Columns, integer $matrix2Rows, integer $matrix2Columns)
Ensure that paired matrix operands are both matrices of the same size
$matrix1 | ||
$matrix2 | ||
integer | $matrix1Rows | Row size of first matrix operand |
integer | $matrix1Columns | Column size of first matrix operand |
integer | $matrix2Rows | Row size of second matrix operand |
integer | $matrix2Columns | Column size of second matrix operand |
_parseFormula( $formula, \PHPExcel_Cell $pCell = NULL)
$formula | ||
\PHPExcel_Cell | $pCell |
_processTokenStack( $tokens, $cellID = NULL, \PHPExcel_Cell $pCell = NULL)
$tokens | ||
$cellID | ||
\PHPExcel_Cell | $pCell |