ASP 经典 - Excel 文件生成空文件

ASP Classic - Excel file generate empty file

我有文件 testeexcel.asp 用于在经典 asp 中生成 excel 文件:

<%@ Language=VBScript %>
<% 
Response.AddHeader "Content-Disposition", "attachment; filename=excelTest.xls"
Response.ContentType = "application/vnd.ms-excel"
%>
<table>
    <tr>
        <td>Test</td>
    </tr>
</table>

但在 excel 中打开时,文件是空白的。如果在 notepad++ 中打开,保存并在 excel 中重新打开,该文件有效。见link测试104.41.63.35/testeexcel.asp

如何配置文件或 IIS 来解决这个问题?

环境:Windows 服务器 2012 - IIS 8.5

Marco - 在过去的几年中,我使用您展示的设置从我的经典 ASP 导出到 Excel 取得了成功 - 但本周我的客户开始报告相同的问题你描述了虽然我们的应用程序没有任何改变。我也一直在寻找答案,我相信另一张海报可能是正确的,指出最近的 Microsoft 更新是罪魁祸首。

我没有卸载更新的选项,并且发现如果我 select 到 "save and open" 而不是 "open"(和 select "yes" 提示 'open anyway?') 我的电子表格已显示。希望对您有所帮助!