Message Format de fichier

Bonjour,

Mon fichier excel fonctionne bien.

Mais quand il se lance un message apparaît.

' Format de fichier'

Comment faire pour ne plus l'avoir à l'ouverture.

capture

Code php

<?php
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header( "Content-disposition: filename= base_pg");
include('config_export.php');// gere les login et pass de la BDD
include ('data_export.php');

$link=database_connect($db); // on se connecte à la base de donn&eacute;e gr&acirc;ce à data_export.php

$table = 'excel'; /* Remplacez par le nom de votre table à exporter ! */
$file = 'export';
$result = mysql_query("SHOW COLUMNS FROM ".$table."");
$xlsx_output='';
?>
<table width='100%'>
        <tr>
        <td><b>nom_dossier</b></td>

        <td><b>type_societe</b></td>

        <td><b>collaborateur</b></td>

        <td><b>date_cloture</b></td>

        <td><b>type_mission</b></td>

        <td><b>t&acirc;che</b></td>

        <td><b>p&eacute;riodicit&eacute;</b></td>

        <td><b>date_&eacute;ch&eacute;ance</b></td>

        <td><b>quantit&eacute;</b></td>

        <td><b>avancement</b></td>

        <td><b>commentaire</b></td>
        </tr>
<?php

$req = "select *  FROM excel WHERE collaborateur='PG'";
$result_set=mysql_query($req);
while($dnn = mysql_fetch_array($result_set))
{
?>
        <tr>
        <td class="left"><?php echo htmlentities($dnn['nom_dossier'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['type_societe'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['collaborateur'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['date_cloture'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['type_mission'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['tache'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['periodicite'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['date_echeance'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['quantite'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['avancement'], ENT_QUOTES, 'UTF-8'); ?></td>

        <td class="left"><?php echo htmlentities($dnn['commentaire'], ENT_QUOTES, 'UTF-8'); ?></td>
    </tr>
<?php
}

$filename = $file."_".date("Y-m-d_H-i",time());

print $xlsx_output;
exit;

?>
 

Merci

Bonjour

En VBA, ce serait en début

Application.DisplayAlerts = False

et à la fin

Application.DisplayAlerts = True

en php?

Cordialement

Rechercher des sujets similaires à "message format fichier"