Disappearance of the format in conditional formatting

Feb 14, 2014 at 10:03 AM
hello,

I create an excel file (as a model ==>export-commande-2007.xlsx) in it there are conditional formatting (If less than 0.3 then text in red / pink background and size% percent).
In my php page (below) I import data from my DB in the "data" tab.
connexion_mysql(); 
$path = '../php/Classes';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
function __autoload($classe)
{
//echo '<p>' . $classe . '</p>';
$fichier = str_replace('_',DIRECTORY_SEPARATOR, $classe ) . '.php' ;
//echo '<p>' . $fichier . '</p>';
require_once($fichier) ; # Chargement de la classe.
}
 
 
$objet = PHPExcel_IOFactory::createReader('Excel2007');
 
$excel = $objet->load('../modele/export-commande-2007.xlsx');
 
$sheet = $excel->getSheetByName('Data1');
$sql='SELECT m.nom as Marque,.......'
//echo $sql;
$requete=mysql_query($sql) or die ('Echec select tablea');
//$sheet->setCellValue('A50', 'MaitrePylos');
//$writer = PHPExcel_IOFactory::createWriter($excel);
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');
//$writer = new \PHPExcel_Writer_Excel5($excel);
$writer ->setPreCalculateFormulas(false);
$col=0;
$lig=2;
while( $result = mysql_fetch_object( $requete ) )
{
      $sheet->setCellValueByColumnAndRow($col,$lig,$result->Marque);
 
      $col=$col+1;
      $sheet->setCellValueByColumnAndRow($col,$lig,$result->tt);
 
      $col=$col+1;
      $sheet->setCellValueByColumnAndRow($col,$lig,$result->cden);
      $col=$col+1;
      $sheet->setCellValueByColumnAndRow($col,$lig,$result->societe);
      $col=$col+1;
            $sheet->setCellValueByColumnAndRow($col,$lig,$result->obj);
      $col=$col+1;
            $sheet->setCellValueByColumnAndRow($col,$lig,$result->objcal);
      $col=$col+1;
            $sheet->setCellValueByColumnAndRow($col,$lig,$result->pour);
      $col=$col+1;
            $sheet->setCellValueByColumnAndRow($col,$lig,$result->diff);
      $col=$col+1;
            $sheet->setCellValueByColumnAndRow($col,$lig,$result->cden1);
      $col=$col+1;
            $sheet->setCellValueByColumnAndRow($col,$lig,$result->realn1);
      $col=$col+1;
                $sheet->setCellValueByColumnAndRow($col,$lig,$result->entretien);
      $col=$col+1;
                $sheet->setCellValueByColumnAndRow($col,$lig,$result->fi);
      $col=$col+1;
                $sheet->setCellValueByColumnAndRow($col,$lig,$result->box);
      $col=$col+1;
                $sheet->setCellValueByColumnAndRow($col,$lig,$result->cld);
      $col=$col+1;
                $sheet->setCellValueByColumnAndRow($col,$lig,$result->T_entretien);
      $col=$col+1;
                    $sheet->setCellValueByColumnAndRow($col,$lig,$result->T_fi);
      $col=$col+1;
                    $sheet->setCellValueByColumnAndRow($col,$lig,$result->T_box);
      $col=$col+1;
                    $sheet->setCellValueByColumnAndRow($col,$lig,$result->T_cld);
      $col=$col+1;
                        $sheet->setCellValueByColumnAndRow($col,$lig,$result->cdenn);
      $col=$col+1;
                            $sheet->setCellValueByColumnAndRow($col,$lig,$result->vsn1);
      $col=$col+1;
            $col=0;
      $lig=$lig+1;
      }
//$writer->save('Exemple14.xlsx');
header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition:inline;filename=Exemple14.xlsx ');
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");;
$writer->save('php://output');
Once the problem the generated file I lose the format that is in the conditional update (standard)

What a mistake I committed? Is this normal?

(Sorry don't speak english)
guigui69