Documentation

Subtotal
in package

Table of Contents

Constants

CALL_FUNCTIONS  = [ 1 => [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::class, 'average'], // 1 and 101 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::class, 'COUNT'], // 2 and 102 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::class, 'COUNTA'], // 3 and 103 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum::class, 'max'], // 4 and 104 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum::class, 'min'], // 5 and 105 [\PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::class, 'product'], // 6 and 106 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::class, 'STDEV'], // 7 and 107 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::class, 'STDEVP'], // 8 and 108 [\PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sum::class, 'sumIgnoringStrings'], // 9 and 109 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::class, 'VAR'], // 10 and 110 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::class, 'VARP'], ]

Methods

evaluate()  : float|int|string
SUBTOTAL.
filterFormulaArgs()  : array<string|int, mixed>
filterHiddenArgs()  : array<string|int, mixed>

Constants

CALL_FUNCTIONS

private array<int, callable> CALL_FUNCTIONS = [ 1 => [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::class, 'average'], // 1 and 101 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::class, 'COUNT'], // 2 and 102 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::class, 'COUNTA'], // 3 and 103 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum::class, 'max'], // 4 and 104 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum::class, 'min'], // 5 and 105 [\PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::class, 'product'], // 6 and 106 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::class, 'STDEV'], // 7 and 107 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::class, 'STDEVP'], // 8 and 108 [\PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sum::class, 'sumIgnoringStrings'], // 9 and 109 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::class, 'VAR'], // 10 and 110 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::class, 'VARP'], ]

Methods

evaluate()

SUBTOTAL.

public static evaluate(mixed $functionType, array<string|int, mixed> ...$args) : float|int|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|int|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
Return values
array<string|int, mixed>

        
On this page

Search results