Documentation

Subtotal

Table of Contents

CALL_FUNCTIONS [ 1 => [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::class, 'average'], [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::class, 'COUNT'], // 2 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::class, 'COUNTA'], // 3 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum::class, 'max'], // 4 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum::class, 'min'], // 5 [\PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::class, 'product'], // 6 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::class, 'STDEV'], // 7 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::class, 'STDEVP'], // 8 [\PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sum::class, 'sumIgnoringStrings'], // 9 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::class, 'VAR'], // 10 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::class, 'VARP'], ]
filterHiddenArgs() array
filterFormulaArgs() array
evaluate() SUBTOTAL. float|string

Constants

CALL_FUNCTIONS

callable[] $CALL_FUNCTIONS = [ 1 => [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::class, 'average'], [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::class, 'COUNT'], // 2 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::class, 'COUNTA'], // 3 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum::class, 'max'], // 4 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum::class, 'min'], // 5 [\PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::class, 'product'], // 6 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::class, 'STDEV'], // 7 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::class, 'STDEVP'], // 8 [\PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sum::class, 'sumIgnoringStrings'], // 9 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::class, 'VAR'], // 10 [\PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::class, 'VARP'], ]

Methods

filterHiddenArgs()

protected static filterHiddenArgs( $cellReference : mixed , $args : mixed ) : array
Parameters
$cellReference : mixed
$args : mixed
Return values
array

filterFormulaArgs()

protected static filterFormulaArgs( $cellReference : mixed , $args : mixed ) : array
Parameters
$cellReference : mixed
$args : mixed
Return values
array

evaluate()

SUBTOTAL.

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

A mixed data series of values

Return values
float|string

Search results