merci apparement il me cree bien le fichier excel mais just une question :
j'ai fais ceci :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| <script language="JavaScript">
function exporter ()
{
<?php
// pour indiquer qu'il s'agit d'un fichier Excel
header("Content-type: application/vnd.ms-excel");
$html='<html><head></head>';
$html.='<body>';
// ici tu mets ton tableau
$html.='<table><tr><td>col1</td><td>col2</td><td>col3</td></tr></table>';
$html.='</body>';
$html.='</html>';
echo $html;
?>
}
</script> |
avec un bouton dans ma page
<input type=submit onclik="exporter()">
le fichier excel se cree au chargement de ma page... hors je voudrais qu'il se cree lorsque je clic sur le bouton...
Merci
Partager