Subtotal
Table of Contents
- CALL_FUNCTIONS = [ 1 => [PhpOfficePhpSpreadsheetCalculationStatisticalAverages::class, 'average'], // 1 and 101 [PhpOfficePhpSpreadsheetCalculationStatisticalCounts::class, 'COUNT'], // 2 and 102 [PhpOfficePhpSpreadsheetCalculationStatisticalCounts::class, 'COUNTA'], // 3 and 103 [PhpOfficePhpSpreadsheetCalculationStatisticalMaximum::class, 'max'], // 4 and 104 [PhpOfficePhpSpreadsheetCalculationStatisticalMinimum::class, 'min'], // 5 and 105 [PhpOfficePhpSpreadsheetCalculationMathTrigOperations::class, 'product'], // 6 and 106 [PhpOfficePhpSpreadsheetCalculationStatisticalStandardDeviations::class, 'STDEV'], // 7 and 107 [PhpOfficePhpSpreadsheetCalculationStatisticalStandardDeviations::class, 'STDEVP'], // 8 and 108 [PhpOfficePhpSpreadsheetCalculationMathTrigSum::class, 'sumIgnoringStrings'], // 9 and 109 [PhpOfficePhpSpreadsheetCalculationStatisticalVariances::class, 'VAR'], // 10 and 110 [PhpOfficePhpSpreadsheetCalculationStatisticalVariances::class, 'VARP'], ]
- evaluate() : float|string
- SUBTOTAL.
- filterFormulaArgs() : array<string|int, mixed>
- filterHiddenArgs() : array<string|int, mixed>
Constants
CALL_FUNCTIONS
private
mixed
CALL_FUNCTIONS
= [
1 => [PhpOfficePhpSpreadsheetCalculationStatisticalAverages::class, 'average'],
// 1 and 101
[PhpOfficePhpSpreadsheetCalculationStatisticalCounts::class, 'COUNT'],
// 2 and 102
[PhpOfficePhpSpreadsheetCalculationStatisticalCounts::class, 'COUNTA'],
// 3 and 103
[PhpOfficePhpSpreadsheetCalculationStatisticalMaximum::class, 'max'],
// 4 and 104
[PhpOfficePhpSpreadsheetCalculationStatisticalMinimum::class, 'min'],
// 5 and 105
[PhpOfficePhpSpreadsheetCalculationMathTrigOperations::class, 'product'],
// 6 and 106
[PhpOfficePhpSpreadsheetCalculationStatisticalStandardDeviations::class, 'STDEV'],
// 7 and 107
[PhpOfficePhpSpreadsheetCalculationStatisticalStandardDeviations::class, 'STDEVP'],
// 8 and 108
[PhpOfficePhpSpreadsheetCalculationMathTrigSum::class, 'sumIgnoringStrings'],
// 9 and 109
[PhpOfficePhpSpreadsheetCalculationStatisticalVariances::class, 'VAR'],
// 10 and 110
[PhpOfficePhpSpreadsheetCalculationStatisticalVariances::class, 'VARP'],
]
Methods
evaluate()
SUBTOTAL.
public
static evaluate(mixed $functionType, array<string|int, mixed> ...$args) : float|string
Returns a subtotal in a list or database.
Parameters
- $functionType : mixed
-
A number 1 to 11 that specifies which function to use in calculating subtotals within a range list Numbers 101 to 111 shadow the functions of 1 to 11 but ignore any values in the range that are in hidden rows
- $args : array<string|int, mixed>
-
A mixed data series of values
Return values
float|string —filterFormulaArgs()
protected
static filterFormulaArgs(mixed $cellReference, mixed $args) : array<string|int, mixed>
Parameters
- $cellReference : mixed
- $args : mixed
Return values
array<string|int, mixed> —filterHiddenArgs()
protected
static filterHiddenArgs(mixed $cellReference, mixed $args) : array<string|int, mixed>
Parameters
- $cellReference : mixed
- $args : mixed