dovrebbe funzionare anche così
Codice PHP:
$nomefile="sviluppo.xls";
header ("Content-Type: application/vnd.ms-excel");
header ("Content-Disposition: inline; filename=$nomefile");
echo "
<table border=1>
<tr>
<td>prima cella</td>
<td>Seconda cella</td>
<td>Terza cella</td>
</tr>
<tr>
<td>secondo rigo</td>
</table>";
exit;