Fix to dynamic autofilter expression in writer, preventing writing
blanks="1"
This commit is contained in:
parent
83afa87bf3
commit
bb0d413a67
|
@ -451,12 +451,16 @@ var_dump($ruleValue);
|
|||
);
|
||||
break;
|
||||
case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER :
|
||||
$ruleValues = array();
|
||||
|
||||
$columnFilterTests[$columnID] = array(
|
||||
'method' => '_filterTypeDynamicFilters',
|
||||
'arguments' => $ruleValues
|
||||
);
|
||||
break;
|
||||
case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER :
|
||||
$ruleValues = array();
|
||||
|
||||
$columnFilterTests[$columnID] = array(
|
||||
'method' => '_filterTypeTopTenFilters',
|
||||
'arguments' => $ruleValues
|
||||
|
|
|
@ -765,7 +765,8 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
|
|||
}
|
||||
|
||||
foreach ($rules as $rule) {
|
||||
if (($rule->getOperator() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL) &&
|
||||
if (($column->getFilterType() === PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER) &&
|
||||
($rule->getOperator() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL) &&
|
||||
($rule->getValue() === '')) {
|
||||
// Filter rule for Blanks
|
||||
$objWriter->writeAttribute('blank', 1);
|
||||
|
|
Loading…
Reference in New Issue