Filter on calculated field

Topics: Developer Forum
Aug 27, 2015 at 11:15 AM
I'd like to apply a filter to a worksheet to grab only the rows where the value of a calculated field (a field calculated from values from fields in other worksheets in the same file) is greater than zero. Is this possible? This is the code I've tried but it doesn't filter anything and all of the calculated fields in the exported file are blank.
$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter();
->setRule(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN, 0);
Aug 28, 2015 at 10:13 AM
The formula in the fields I'm trying to filter on looks like this:
It looks up values from one of the other workbooks in the same file. I've searched the code library and there is a function that appears to handle VLOOKUP but so far all I see returned is #N/A and the filter isn't filtering.

Aug 28, 2015 at 10:57 AM
System is:
Windows 7 64-bit
PHP Version => 5.6.12
Running PHP from the command line.
Aug 28, 2015 at 11:43 AM
I've noticed that if I do "not equal to blank" the filter does work.
->setRule(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL, '');