Output an Excel file from classic ASP and Office 2010 don't open

I have an application that generates a classic asp excel file, it has been operating years. A few days ago I see that excel generates doen't open with excel 2010. I have tried from multiple computers and the result is the same. However, the file opens from OpenOffice. I think is a problem with Excel 2010.

I use this sentence:

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "content-disposition", "inline; filename=test.xls"

I have tried too using:

Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

Any ideas? Thanks in advance

Upvotes: 0

Views: 1067

Answers (1)

Mr Bondo
Mr Bondo

Reputation: 11

I have come across the same issue with customers using Excel 2016. It seemed to have started after a patch to excel on the 13th.

To get the customers running again we had them turn off "Enable Protected View for files originating from the Internet" and "Enable Protected View for files located in potentially unsafe locations".

Haven't found a fix for it yet.

Edit: another better solution I've found is to have the customer add the site to their "Trusted sites".

Upvotes: 1

Related Questions