I'm trying to deliver an Excel document to the user, which is composed in XML format. The content begins like this:
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
etc...
I was delivering this as an .xls
file, MIME type simply application/excel
and Content-Disposition: attachment
. In IE < 10 and Office < 2010, it would open directly in MS Excel, no problems.
Now, with IE10 and Office 2010, behaviour is completely different and I can't get it to work. Excel is complaining that the format is different to the file extension (https://i.stack.imgur.com/GsDy8.gif). This occurs no matter which of the possible Excel MIME types I use.
If I change the extension to .xml
, IE keeps trying to open it in a new tab, resulting in nothing but a blank page. Again, this occurs no matter what MIME type I try, and regardless of the "attachment" setting (which is supposed to open it outside IE).
What am I doing wrong here, considering it used to work fine before?