"Fossies" - the Fresh Open Source Software Archive

Member "groupoffice-6.4.210-php-71/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/03-Autofilter-Expressions.md" (22 Nov 2018, 1110 Bytes) of package /linux/www/groupoffice-6.4.210-php-71.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

PHPExcel AutoFilter Reference

Autofilter Expressions

PHPEXcel 1.7.8 introduced the ability to actually create, read and write filter expressions; initially only for Excel2007 files, but later releases will extend this to other formats.

To apply a filter expression to an autoFilter range, you first need to identify which column you’re going to be applying this filter to.

$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter();
$columnFilter = $autoFilter->getColumn('C');

This returns an autoFilter column object, and you can then apply filter expressions to that column.

There are a number of different types of autofilter expressions. The most commonly used are:

These different types are mutually exclusive within any single column. You should not mix the different types of filter in the same column. PHPExcel will not actively prevent you from doing this, but the results are unpredictable.

Other filter expression types (such as cell colour filters) are not yet supported.