gen*_*cay 2 php export-to-excel
我已经找到了其他类似问题的答案,但看不到有用的..
我有一个用mysql db生成的html表.我在我的php文件中使用这个片段保存为excel
$file="program.xls";
header('Content-Type: text/html');
$table = $_POST['tablehidden'];//i get this from another php file.It is HTML table
header("Content-type: application/x-msexcel"); //tried adding charset='utf-8' into header
header("Content-Disposition: attachment; filename=$file");
echo $table;
如何解决字符集和样式问题?我看过phpexcel但看不到直接包含表的方法.