header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=表格名称.xls");
header('Pragma:no-cache');
header('Expires:0');
<?php //hello world! ?>
<html>
<head></head>
<table><thead><th>表头</th></thead><tbody><tr><td>内容</td></tr></tbody></table>
</html>