Bonsoir,
Je voudrais savoir s'il est possible de faire un tableau php (je sais que oui) qui reprenne des données d'une TABLE mais (et elle est là ma question) faire en sorte de pouvoire imprimer le TABLEAU sous un format EXCEL ?
Merci
Ce que l'on apprend par l'effort reste toujours ancré beaucoup plus longtemps.
Code : Tout sélectionner
<?
header("Content-Type: application/force-download; name=\"$NomFichier\"");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=\"$NomFichier\"");
header("Expires: 0");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");?>
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="www.w3.org/TR/REC-html40&...
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-latin-1" />
<meta name="ProgId" content="Excel.Sheet" />
<meta name="Generator" content="Microsoft Excel 9" />
<style>
<!--//
td.xleuro {
mso-style-parent:style0;
mso-number-format:"\#\,\#\#0\.00\\ \0022\20AC\0022";
}
//-->
</style>
</head>
<body>
<table x:str="true" border="1" cellpadding="0" cellspacing="0">
<tr>
<th>Numero</th>
<th>Montant</th>
<th>France Telecom</th>
<th>Orange</th>
<th>Wanadoo</th>
<th>Canal</th>
</tr>
<tr>
<td x:num=''>1234567892</td>
<td class='xleuro' x:num=''>125</td>
<td class='xleuro' x:num=''>50</td>
<td class='xleuro' x:num=''>50</td>
<td class='xleuro' x:num=''>25</td>
<td class='xleuro' x:num=''>Moi</td>
</tr>
<tr>
<td x:num=''>1234567893</td>
<td class='xleuro' x:num=''>130</td>
<td class='xleuro' x:num=''>10</td>
<td class='xleuro' x:num=''>10</td>
<td class='xleuro' x:num=''>10</td>
<td class='xleuro' x:num=''>Machin</td>
</tr>
</table>
</body>
</html>