Thought I'd dust the cobwebs off my blog by sharing something I came across today...
I came across an issue where a user reported that a web application was not opening Excel content they were requesting.
Basically the application was sending csv formatted text to the browser and the browser (Internet Explorer) was supposed to open this with Microsoft Excel 2010.
The template sending the content had the correct headers configured to instruct the browser to open this in Microsoft Excel and the content was valid but for some reason the new window was failing silently without promting the user to open \ save the file. The only clue was that this was a new PC with Windows 7 and Internet Explorer 8 installed and their previous PC worked fine.
I decided to check with Firefox and voila - I was prompted to Open / Save the file.
So after diagnosing different scenarios through the code I then started looking into the settings on the PC for Internet Explorer.
It turned out that there was a setting in Internet Explorer which was preventing the browser from opening Excel.
In order to fix this I simply changed the following:
- In Internet Explorer go to "Tools" > "Internet Options"
- Select the "Security" tab
- Select the "Zone" you wish to configure e.g. Internet
- Select the "Custom Level" button
- In the settings dialog scroll down to the "Downloads" section
- Finally select "enable" or "prompt" settings in this section
That's it. Internet Explorer should now allow users to download alternative content.
Hope this helps someone else out there!