Search code examples
excelformatwarningsdetection

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 that 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.


Solution

  • 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.