IE6 opening XLSX file as an XLS file

大兔子大兔子 提交于 2020-01-15 12:06:09

问题


My application generates XLSX files based on a users requirements.

After the XLSX file is generated the user is redirected to where the file is saved using Response.Redirect...

Response.Redirect("filename.xlsx")

When the user then opens the file... they recieve this message.

The file you are trying to open, 'filename.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?

As a temporary fix I've instructed my users to press "Yes" when they receive this message and the file opens perfectly fine.

Does anyone have any ideas why IE6 is trying to open an XLSX file as an XLS?

Note: I have a similar application that generates PPTX files in the same manner - and these open without a problem.


回答1:


I've found that it is an issue with older versions of windows server.

Both the xlsx MIME type needs to be added and there are also a couple driver updates that need to be installed (I don't know specifically which ones. Our IT department is taking care of it)

To add the MIME type: Go to IIS Manager and add the .xlsx MIME type. (Documentation).

The MIME type that needs to be added is:

  • File Extension: .xlsx
  • MIME Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Further information on this can be found here: http://technet.microsoft.com/en-us/library/ee309278(office.12).aspx




回答2:


I think, you cannot solve that problem by hosting or etc. it depend on your computer...

Here is the fix from Microsoft website ;

To configure Internet Explorer to open Office files in the appropriate Office program by using the Folder Options tool:

  1. Open My Computer.
  2. On the Tools menu (or the View menu), click Folder Options (or click Options).
  3. Click the File Types tab.
  4. In the Registered file types list, click the specific Office document type (for example, Microsoft Excel Worksheet), and then click Advanced (or click Edit).
  5. In the Edit File Type dialog box, click to clear the Browse in same window check box (or click to clear the Open Web documents in place check box).
  6. Click OK.

Here is the link http://support.microsoft.com/?scid=kb%3Ben-us%3B162059&x=13&y=13



来源:https://stackoverflow.com/questions/3249220/ie6-opening-xlsx-file-as-an-xls-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!