How to determine real format of an XLSX Excel file?
I have a well known problem that is described in Extension Warning On Opening Excel Workbook from a Web Site microsoft blog entry. I've added URL rewrite to have URL nicely formatted and my mime type matches exactly XLSX recommended file type. However I still get a warning. I suspect tha开发者_开发问答t service that provides me those xlsx files mismatches real file format and extension.
Is there a way to determine real xlsx file format? Something that would say what is the native extension for particular Excel file.
Thanks in advance.
Have you tried changing the mime header from vnd:excel
to octet-stream
? This will still bring Excel up, albeit not embedded into IE, which vnd:excel
does (but I hate vnd:excel
anyways because embedding the spreadsheet into the browser screws up the form flow of my web apps).
Did not find an answer for that anyway. However I've discovered the reason why I get a warning from Excel - any parameter in query string will trigger such a warning, even for static files:
http://localhost/1.xls
works ok
http://localhost/1.xls?testparam=paramvalue
gives a warning.
Will use URL rewrite to encode parameters.
精彩评论