1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <?php
function sc26xml2excel ($file,&$workbook) {
if(file_exists($file)) {
$SC26 = simplexml_load_file($file);
echo "$file";
} else {
exit('Echec lors de l\'ouverture du fichier $file .');
}
$sheet = $workbook->getActiveSheet();
$sheet->setCellValue('A1',$SC26->IdDem);
$sheet->setCellValue('A2',$SC26->HORInfo);
$sheet->setCellValue('A3',$SC26->TypeEvenement);
$sheet->setCellValue('A4',$SC26->CodeGdoDS);
$sheet->setCellValue('A5',$SC26->PointRaccordementK);
$sheet->setCellValue('A6',$SC26->MoyCreditCPLMoyPDCNonCom);
$sheet->setCellValue('A7',$SC26->PcentAvencementGrappe);
}
sc26xml2excel($_GET['namefile'],$workbook);
?> |
Partager