Constants

AUTOFILTER_FILTERTYPE_FILTER

AUTOFILTER_FILTERTYPE_FILTER = 'filters'

AUTOFILTER_FILTERTYPE_CUSTOMFILTER

AUTOFILTER_FILTERTYPE_CUSTOMFILTER = 'customFilters'

AUTOFILTER_FILTERTYPE_DYNAMICFILTER

AUTOFILTER_FILTERTYPE_DYNAMICFILTER = 'dynamicFilter'

AUTOFILTER_FILTERTYPE_TOPTENFILTER

AUTOFILTER_FILTERTYPE_TOPTENFILTER = 'top10'

AUTOFILTER_COLUMN_JOIN_AND

AUTOFILTER_COLUMN_JOIN_AND = 'and'

AUTOFILTER_COLUMN_JOIN_OR

AUTOFILTER_COLUMN_JOIN_OR = 'or'

Properties

$filterTypes

$filterTypes : array<mixed,string>

Types of autofilter rules.

Type

array<mixed,string>

$ruleJoins

$ruleJoins : array<mixed,string>

Join options for autofilter rules.

Type

array<mixed,string>

$columnIndex

$columnIndex : string

Autofilter Column Index.

Type

string

$filterType

$filterType : string

Autofilter Column Filter Type.

Type

string

$join

$join : string

Autofilter Multiple Rules And/Or.

Type

string

$ruleset

$ruleset : array

Autofilter Column Rules.

Type

array — of Column\Rule

$attributes

$attributes : array

Autofilter Column Dynamic Attributes.

Type

array — of mixed

Methods

__construct()

__construct(string  $pColumn, \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter  $pParent = null) 

Create a new Column.

Parameters

string $pColumn

Column (e.g. A)

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter $pParent

Autofilter for this column

getColumnIndex()

getColumnIndex() : string

Get AutoFilter Column Index.

Returns

string

setColumnIndex()

setColumnIndex(string  $pColumn) : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

Set AutoFilter Column Index.

Parameters

string $pColumn

Column (e.g. A)

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

getFilterType()

getFilterType() : string

Get AutoFilter Type.

Returns

string

setFilterType()

setFilterType(string  $pFilterType) : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

Set AutoFilter Type.

Parameters

string $pFilterType

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

getJoin()

getJoin() : string

Get AutoFilter Multiple Rules And/Or Join.

Returns

string

setJoin()

setJoin(string  $pJoin) : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

Set AutoFilter Multiple Rules And/Or.

Parameters

string $pJoin

And/Or

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

setAttribute()

setAttribute(string  $pName, string  $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

Set An AutoFilter Attribute.

Parameters

string $pName

Attribute Name

string $pValue

Attribute Value

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

getAttributes()

getAttributes() : array<mixed,string>

Get AutoFilter Column Attributes.

Returns

array<mixed,string>

getAttribute()

getAttribute(string  $pName) : string

Get specific AutoFilter Column Attribute.

Parameters

string $pName

Attribute Name

Returns

string

deleteRule()

deleteRule(integer  $pIndex) : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

Delete a specified AutoFilter Column Rule If the number of rules is reduced to 1, then we reset And/Or logic to Or.

Parameters

integer $pIndex

Rule index in the ruleset array

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column

__clone()

__clone() 

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