Technically, only the mime types which are listed in servletcontainer's own web.xml
(such as the /conf/web.xml
one in Tomcat), are recognized and supported based on the file extension.
The .xlsx
extension is relatively new and not supported by older servletcontainers. You can however define custom mime types in your webapp's /WEB-INF/web.xml
:
<mime-mapping>
<extension>xlsx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
</mime-mapping>
If you have full admin control over the servletcontainer, you can of course also add it over there, such as Tomcat's /conf/web.xml
file.
That it works in FF is because FF will determine by itself based on the file extension against the client-specific mime type mapping ("file associations" as it is called in Windows), when the HTTP Content-Type
response header of the file download is absent or overly generic.
The related question which you found there applies to .xls
files only (and is already by default supported by most of the current servletcontainers). You can find an overview of all new Office 2007 OpenXML file mime types here: http://filext.com/faq/office_mime_types.php