Aquí va el código PHP:
header(“Pragma: public”);
header(“Expires: 0″);
$filename = “table.xls”;
header(“Content-Type: application/vnd.ms-excel”);
header(“Content-Disposition: attachment; filename=$filename”);
header(“Pragma: no-cache”);
header(“Cache-Control: must-revalidate, post-check=0, pre-check=0″);
echo ‘<table>…</table>’;
