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>

$parent

$parent : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter

Autofilter.

Type

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter

$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 as string eg: 'A'.

Returns

string

setColumnIndex()

setColumnIndex(string  $pColumn) : $this

Set AutoFilter column index as string eg: 'A'.

Parameters

string $pColumn

Column (e.g. A)

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

$this

getParent()

getParent() : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter

Get this Column's AutoFilter Parent.

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter

setParent()

setParent(\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter  $pParent = null) : $this

Set this Column's AutoFilter Parent.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter $pParent

Returns

$this

getFilterType()

getFilterType() : string

Get AutoFilter Type.

Returns

string

setFilterType()

setFilterType(string  $pFilterType) : $this

Set AutoFilter Type.

Parameters

string $pFilterType

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

$this

getJoin()

getJoin() : string

Get AutoFilter Multiple Rules And/Or Join.

Returns

string

setJoin()

setJoin(string  $pJoin) : $this

Set AutoFilter Multiple Rules And/Or.

Parameters

string $pJoin

And/Or

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

$this

setAttributes()

setAttributes(array<mixed,string>  $attributes) : $this

Set AutoFilter Attributes.

Parameters

array<mixed,string> $attributes

Returns

$this

setAttribute()

setAttribute(string  $pName, string  $pValue) : $this

Set An AutoFilter Attribute.

Parameters

string $pName

Attribute Name

string $pValue

Attribute Value

Returns

$this

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) : $this

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

$this

clearRules()

clearRules() : $this

Delete all AutoFilter Column Rules.

Returns

$this

__clone()

__clone() 

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