Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Background: For some reason, whenever a user tries to open an xslx (excel 2007) file from our intranet using MSIE, the file download dialog interprets it as a "zip" file.

Admittedly, xslx files really are zip files, but we don't want that behavior. Just open in Excel, please.


Firefox, OTOH, opens the files normally. Is it possible that the fault is my apache configs? or is this a client-browser-only issue?

share|improve this question
what version of IE are you running? – warren Oct 30 '09 at 4:53
up vote 5 down vote accepted

You can indeed fix this in Apache's configuration. Add the following lines (and ensure that mod_mime is enabled):

AddType application/ .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/ potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/ ppam
AddType application/ ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/ pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/ xlam
AddType application/ xlsb
AddType application/ xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/ xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

This will ensure that Apache sends the appropriate MIME type to the client, and IE will understand that the files are Office documents and not zips.

share|improve this answer
This work, but why the hell does this happen just in IE? Is not a firefox issue since is just in IE... – Keyne Viana Dec 9 '10 at 17:03
Both Firefox and IE have algorithms that are used to determine the file type when it is not provided by the server (as in this case). The Firefox algorithm is able to recognise the files and the IE one is not - this is admittedly ironic considering that Office and IE are built by the same company, but not particularly surprising. – Tony Meyer Dec 14 '10 at 23:26
Nice answer. I had completely forgotten about this. The irony regarding Office & IE is indeed pretty rich... – DaveParillo Dec 21 '10 at 22:04

I doubt it's an apache config issue. Internet Explorer has it's own MIME Type Detection algorithm. You can circumvent this behavior by right-clicking and selecting 'File -> Save As' or just use MS 2003 .doc format.

share|improve this answer
Yes but... this is odd. We can't tell end users "Click save as because the file is downloaded incorectly"... It's a IE issue that has a fix with apache config. – Keyne Viana Dec 9 '10 at 17:05
Yeah, it is odd, & I had completely forgotten about mod_mime, so you can actually fix this on the server end. Go figure IE needs apache to tell it how to interpret an office document.... – DaveParillo Dec 21 '10 at 22:03

if its an apache config issue then there is the file that contains the mapping of extensions to mime types that you can quickly examine to rule out this possibility.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .