Properties

$_range

$_range : string

Autofilter Range

Type

string

$_columns

$_columns : array

Autofilter Column Ruleset

Type

array — of PHPExcel_Worksheet_AutoFilter_Column

$_fromReplace

$_fromReplace : array

Search/Replace arrays to convert Excel wildcard syntax to a regexp syntax for preg_matching

Type

array

$_toReplace

$_toReplace : 

Type

Methods

__construct()

__construct(string  $pRange = '', \PHPExcel_Worksheet  $pSheet = NULL) 

Create a new PHPExcel_Worksheet_AutoFilter

Parameters

string $pRange

Cell range (i.e. A1:E10)

\PHPExcel_Worksheet $pSheet

getParent()

getParent() : \PHPExcel_Worksheet

Get AutoFilter Parent Worksheet

Returns

\PHPExcel_Worksheet

getRange()

getRange() : string

Get AutoFilter Range

Returns

string

setRange()

setRange(string  $pRange = '') : \PHPExcel_Worksheet_AutoFilter

Set AutoFilter Range

Parameters

string $pRange

Cell range (i.e. A1:E10)

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_AutoFilter

getColumns()

getColumns() : array

Get all AutoFilter Columns

Throws

\PHPExcel_Exception

Returns

array —

of PHPExcel_Worksheet_AutoFilter_Column

testColumnInRange()

testColumnInRange(string  $column) : integer

Validate that the specified column is in the AutoFilter range

Parameters

string $column

Column name (e.g. A)

Throws

\PHPExcel_Exception

Returns

integer —

The column offset within the autofilter range

getColumnOffset()

getColumnOffset(string  $pColumn) : integer

Get a specified AutoFilter Column Offset within the defined AutoFilter range

Parameters

string $pColumn

Column name (e.g. A)

Throws

\PHPExcel_Exception

Returns

integer —

The offset of the specified column within the autofilter range

getColumn()

getColumn(string  $pColumn) : \PHPExcel_Worksheet_AutoFilter_Column

Get a specified AutoFilter Column

Parameters

string $pColumn

Column name (e.g. A)

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_AutoFilter_Column

getColumnByOffset()

getColumnByOffset(integer  $pColumnOffset) : \PHPExcel_Worksheet_AutoFilter_Column

Get a specified AutoFilter Column by it's offset

Parameters

integer $pColumnOffset

Column offset within range (starting from 0)

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_AutoFilter_Column

clearColumn()

clearColumn(string  $pColumn) : \PHPExcel_Worksheet_AutoFilter

Clear a specified AutoFilter Column

Parameters

string $pColumn

Column name (e.g. A)

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_AutoFilter

shiftColumn()

shiftColumn(string  $fromColumn = NULL, string  $toColumn = NULL) : \PHPExcel_Worksheet_AutoFilter

Shift an AutoFilter Column Rule to a different column

Note: This method bypasses validation of the destination column to ensure it is within this AutoFilter range. Nor does it verify whether any column rule already exists at $toColumn, but will simply overrideany existing value. Use with caution.

Parameters

string $fromColumn

Column name (e.g. A)

string $toColumn

Column name (e.g. B)

Returns

\PHPExcel_Worksheet_AutoFilter

showHideRows()

showHideRows() : \PHPExcel_Worksheet_AutoFilter

Apply the AutoFilter rules to the AutoFilter Range

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet_AutoFilter

__clone()

__clone() 

Implement PHP __clone to create a deep clone, not just a shallow copy.

__toString()

__toString() 

toString method replicates previous behavior by returning the range if object is referenced as a property of its parent.

_filterTestInSimpleDataSet()

_filterTestInSimpleDataSet(mixed  $cellValue, array<mixed,mixed>  $dataSet) : boolean

Test if cell value is in the defined set of values

Parameters

mixed $cellValue
array<mixed,mixed> $dataSet

Returns

boolean

_filterTestInDateGroupSet()

_filterTestInDateGroupSet(mixed  $cellValue, array<mixed,mixed>  $dataSet) : boolean

Test if cell value is in the defined set of Excel date values

Parameters

mixed $cellValue
array<mixed,mixed> $dataSet

Returns

boolean

_filterTestInCustomDataSet()

_filterTestInCustomDataSet(mixed  $cellValue, array<mixed,mixed>  $ruleSet) : boolean

Test if cell value is within a set of values defined by a ruleset

Parameters

mixed $cellValue
array<mixed,mixed> $ruleSet

Returns

boolean

_filterTestInPeriodDateSet()

_filterTestInPeriodDateSet(mixed  $cellValue, array<mixed,mixed>  $monthSet) : boolean

Test if cell date value is matches a set of values defined by a set of months

Parameters

mixed $cellValue
array<mixed,mixed> $monthSet

Returns

boolean

_dynamicFilterDateRange()

_dynamicFilterDateRange(string  $dynamicRuleType,   $filterColumn) : array<mixed,mixed>

Convert a dynamic rule daterange to a custom filter range expression for ease of calculation

Parameters

string $dynamicRuleType
$filterColumn

Returns

array<mixed,mixed>

_calculateTopTenValue()

_calculateTopTenValue(  $columnID,   $startRow,   $endRow,   $ruleType,   $ruleValue) 

Parameters

$columnID
$startRow
$endRow
$ruleType
$ruleValue