<?php
include_once("xlsxwriter.class.php");

ini_set('display_errors', 1);
ini_set('log_errors', 1);
error_reporting(E_ALL & ~E_NOTICE);


$destination_t = $_SERVER["XLSX_DESTINATION"];
$data_t = $_SERVER["XLSX_DATA"];	


$dataXlsx = array();
$dataLigne = array();

// Mettre chaque ligne dans un tableau
$data_Ligne_at = explode(';;',$data_t);

foreach ($data_Ligne_at as $ligne_t)
{
    $data_Col_at = explode(';',$ligne_t);
    
    $dataLigne = array();
    
    foreach ($data_Col_at as $Col_t)
    {
    
    	$dataLigne[] = $Col_t;
   
	}
	
	$dataXlsx[] = $dataLigne;
}


$writer = new XLSXWriter();
$writer->setAuthor('KinTPV');
$writer->writeSheet($dataXlsx,'Sheet1');

$writer->writeToFile($destination_t);


exit(0);

?>



