1

I have the file testeexcel.asp used to generate excel file in classic asp:

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

but when open in excel, the file is blank. If opened in notepad++, saved and reopened in excel the file works. See the link to test 104.41.63.35/testeexcel.asp

How to configure the file or IIS to resolve this problem?

Environment: Windows server 2012 - IIS 8.5

1 Answers1

3

Marco - I have had success for the last several years with exporting from my Classic ASP to Excel using the setup you show -- but this week my clients have started reporting the same issue you describe although nothing about our application has changed. I have also been looking for an answer and I believe another poster may be correct pointing out that a recent Microsoft update is the culprit.

Opening excel files from the internet opens a blank excel window

I do not have the option to uninstall the update and have found that if I select to "save and open" instead of just "open" (and select "yes" to the prompt to 'open anyway?') my spreadsheet was displayed. Hope that helps!

Community
  • 1
  • 1
cjchamber
  • 46
  • 1
  • However, uninstalling the update is not the answer - you can't ask your users to uninstall such updates. – Paul Jul 27 '16 at 07:40
  • @MarcoAntonioQuintal -- We also discovered that our site had to be added as a "Trusted" site otherwise the prompt to "save and open" was not displaying. Hope that helps as well. – cjchamber Jul 28 '16 at 15:15