当使用条件格式和基于另一个单元格的突出显示excel单元格时,我正在使用 PHPExcel 生成excel工作表。条件 工作良好。但值在单元格中显示两次。
这是我的代码:
$objConditional43= new PHPExcel_Style_Conditional();
$objConditional43->setConditionType(PHPExcel_Style_Conditional::CONDITION_EXPRESSION)->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_BETWEEN)->addCondition('AND((S46<>AA124))');
$objConditional43->getStyle()->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getEndColor()->setARGB(PHPExcel_Style_Color::COLOR_RED);
$conditionalStyles = $objPHPExcel->getActiveSheet()->getStyle('S46')->getConditionalStyles();
array_push($conditionalStyles, $objConditional43);
$objPHPExcel->getActiveSheet()->getStyle('S46')->setConditionalStyles($conditionalStyles);
预期结果: 我期望得到如下结果