When applying conditional formatting to a% spreadsheet generated with PHPExcel , it works without problems when the document is open at LibreOffice :
$objConditional = new PHPExcel_Style_Conditional();
$objConditional->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS)
->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_EQUAL)
->addCondition('='.$index_min_cell);
$objConditional->getStyle()->getFont()->getColor()->setRGB('FFFFFF');
$objConditional->getStyle()->getFont()->setSize(8);
$objConditional->getStyle()->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getEndColor()->setRGB('5c8526');
$objConditional->getStyle()->getNumberFormat()->setFormatCode("[$$-409]#,##0.00;-[$$-409]#,##0.00");
$explode=explode(',', $condition_min_med);
for ($m=0; $m<count($explode); $m++) {
$sheet_00->getStyle($explode[$m])->setConditionalStyles(array($objConditional));
}
But when the document is opened using Microsoft Office, it has the following information-rich error:
Functionality Removed: Conditional formatting of the /xl/worksheets/sheet1.xml part
With Link to an XML with the following information:
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error033680_04.xml</logFileName>
<summary>Foram detectados erros no ficheiro 'C:\Users\JohnDoe\AppData\Local\Temp\super_bubu.xlsx'</summary>
<removedFeatures summary="Segue-se uma lista de funcionalidades removidas:">
<removedFeature>Funcionalidade Removida: Formatação condicional da parte /xl/worksheets/sheet1.xml</removedFeature>
</removedFeatures>
</recoveryLog>
Question
Since the information regarding the error only indicates that the functionality has been removed, and taking into account that the document when opened in LibreOffice works without problems using the conditional formatting applied:
For any reason Microsoft Office Excel 2010 ignores the conditional formatting that is being applied?
Note:
This is part of a very large file that tries to generate the entire spreadsheet, but this particular part, if removed, causes Excel to stop displaying the error ... Of course, conditional formatting is not there!