3
When applying conditional formatting to a spreadsheet xlsx
generated with the Phpexcel, the same works smoothly when the document is opened in 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 shows the following error information-rich:
Feature Removed: Conditional formatting of part /Xl/worksheets/sheet1.xml
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 error information only indicates that the functionality has been removed, and taking into account that the document when opened in Libreoffice works smoothly making use of the conditional formatting applied:
What is the reason for any 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 no longer present the error... Of course the conditional formatting is not there!
In which excel version was the test done? the spreadsheet is in the format of excel5 or 2007?
– rray
@lost The file being generated is a
XLSX
and is being tested in Excel 2010.– Zuul