我有一个用php编写的脚本,导出一个html表格到excel使用MIME类型。
从昨天2016/07/20开始,excel 2010不再从我的网站打开任何文件,并且我注意到不再从任何其他执行相同出口的网站打开文件。
这是一个测试代码
<?php
header('ContentType : application/vnd.ms-excel');
header('Content-Disposition : attachment;filename=test.xls');
header('Pragma : no-cache');
$out = "
<table>
<tr>
<td>something 1</td>
<td>something 2</td>
<td>something 3</td>
<td>something 4</td>
<td>something 5</td>
</tr>
</table>
";
echo $out;
?>代码仍在运行,但任何excel 2010都会打开此文件
谢谢
发布于 2016-07-27 02:44:31
最近(2016年7月12日)有一个MS Excel安全更新。执行以下操作以在Excel中查看文件:
“
我还没有找到任何永久的修复方法来继续在Excel中允许HTML->XLS查看。
发布于 2016-07-22 02:59:29
我从文件的格式中看到它是.xls,它来自Excel2003。在微软网站上有一个支持问题-这里是a link。也许是因为你的Excel程序,而不是你的网站。
https://stackoverflow.com/questions/38511968
复制相似问题