class PHPExcel_Worksheet_AutoFilter

PHPExcelWorksheetAutoFilter

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Methods

__construct($pRange = '', PHPExcel_Worksheet $pSheet = null)

Create a new PHPExcelWorksheetAutoFilter

getParent()

Get AutoFilter Parent Worksheet

setParent(PHPExcel_Worksheet $pSheet = null)

Set AutoFilter Parent Worksheet

string
getRange()

Get AutoFilter Range

setRange($pRange = '')

Set AutoFilter Range

array
getColumns()

Get all AutoFilter Columns

integer
testColumnInRange(string $column)

Validate that the specified column is in the AutoFilter range

integer
getColumnOffset(string $pColumn)

Get a specified AutoFilter Column Offset within the defined AutoFilter range

getColumn(string $pColumn)

Get a specified AutoFilter Column

getColumnByOffset(integer $pColumnOffset)

Get a specified AutoFilter Column by it's offset

setColumn($pColumn)

Set AutoFilter

clearColumn(string $pColumn)

Clear a specified AutoFilter Column

shiftColumn($fromColumn = null, $toColumn = null)

Shift an AutoFilter Column Rule to a different column

showHideRows()

Apply the AutoFilter rules to the AutoFilter Range

__clone()

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

__toString()

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

Details

at line 69
__construct($pRange = '', PHPExcel_Worksheet $pSheet = null)

Create a new PHPExcelWorksheetAutoFilter

@param string $pRange Cell range (i.e. A1:E10)

Parameters

$pRange
PHPExcel_Worksheet $pSheet

at line 80
PHPExcel_Worksheet getParent()

Get AutoFilter Parent Worksheet

Return Value

PHPExcel_Worksheet

at line 91
PHPExcel_Worksheet_AutoFilter setParent(PHPExcel_Worksheet $pSheet = null)

Set AutoFilter Parent Worksheet

Parameters

PHPExcel_Worksheet $pSheet

Return Value

PHPExcel_Worksheet_AutoFilter

at line 103
string getRange()

Get AutoFilter Range

Return Value

string

at line 115
setRange($pRange = '')

Set AutoFilter Range

@param string $pRange Cell range (i.e. A1:E10)

Parameters

$pRange

Exceptions

PHPExcel_Exception @return PHPExcelWorksheetAutoFilter

at line 154
array getColumns()

Get all AutoFilter Columns

Return Value

array of PHPExcelWorksheetAutoFilter_Column

Exceptions

PHPExcel_Exception

at line 166
integer testColumnInRange(string $column)

Validate that the specified column is in the AutoFilter range

Parameters

string $column Column name (e.g. A)

Return Value

integer The column offset within the autofilter range

Exceptions

PHPExcel_Exception

at line 188
integer getColumnOffset(string $pColumn)

Get a specified AutoFilter Column Offset within the defined AutoFilter range

Parameters

string $pColumn Column name (e.g. A)

Return Value

integer The offset of the specified column within the autofilter range

Exceptions

PHPExcel_Exception

at line 200
PHPExcel_Worksheet_AutoFilter_Column getColumn(string $pColumn)

Get a specified AutoFilter Column

Parameters

string $pColumn Column name (e.g. A)

Return Value

PHPExcel_Worksheet_AutoFilter_Column

Exceptions

PHPExcel_Exception

at line 218
PHPExcel_Worksheet_AutoFilter_Column getColumnByOffset(integer $pColumnOffset)

Get a specified AutoFilter Column by it's offset

Parameters

integer $pColumnOffset Column offset within range (starting from 0)

Return Value

PHPExcel_Worksheet_AutoFilter_Column

Exceptions

PHPExcel_Exception

at line 234
setColumn($pColumn)

Set AutoFilter

@param PHPExcelWorksheetAutoFilter_Column|string $pColumn A simple string containing a Column ID like 'A' is permitted

Parameters

$pColumn

Exceptions

PHPExcel_Exception @return PHPExcelWorksheetAutoFilter

at line 263
PHPExcel_Worksheet_AutoFilter clearColumn(string $pColumn)

Clear a specified AutoFilter Column

Parameters

string $pColumn Column name (e.g. A)

Return Value

PHPExcel_Worksheet_AutoFilter

Exceptions

PHPExcel_Exception

at line 285
shiftColumn($fromColumn = null, $toColumn = null)

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

$fromColumn
$toColumn

at line 602
PHPExcel_Worksheet_AutoFilter showHideRows()

Apply the AutoFilter rules to the AutoFilter Range

@throws PHPExcel_Exception

at line 822
__clone()

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

at line 851
__toString()

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