سؤال

I am working on a Java Flex Web application. Here I need to download the processed xlsx file from the server path. So we have used the below as3 code:

navigateToURL(URLRequest,"_blank");

The below url is opened in the browser: http://abcd.com/ple/data/xxxxxx/19/reports/sanple.xlsx

When I open the browser in the Internet explorer it is getting downloaded as .zip file. enter image description here

If I open the Zip file I could see some irrelevant files as shown below. enter image description here

Anyway on using the same URL in Firefox and Chrome browser, the xlsx file is downloaded properly without any issue. Why IE explorer alone is downloading xlsx file as zip file. Can someone help me to download the xlsx file as it is.

Thanks in advance.

هل كانت مفيدة؟

المحلول

I had this same problem and the root cause was IIS didn't have the latest MIME types defined. Our old IntrAnet was running Windows Server 2003, we upgraded MS-Office to version 2010 (which uses the DOCX, XLSX format).

I copied the MIME types from my 2014 web server to my 2003 server, restarted IIS and everything works fine now.

Here are the new MIME types I added (remember to restart IIS after applying):

.docx  application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotx  application/vnd.openxmlformats-officedocument.wordprocessingml.template
.potx  application/vnd.openxmlformats-officedocument.presentationml.template
.ppsx  application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptx  application/vnd.openxmlformats-officedocument.presentationml.presentation
.xlsb  application/vnd.openxmlformats-officedocument.spreadsheetml.template
.xlsx  application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top