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 Answer 1

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!

Sign up to request clarification or add additional context in comments.

2 Comments

However, uninstalling the update is not the answer - you can't ask your users to uninstall such updates.
@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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.