aspose file tools*
The moose likes BEA/Weblogic and the fly likes Error while dowloading excel using weblogic server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Error while dowloading excel using weblogic server" Watch "Error while dowloading excel using weblogic server" New topic
Author

Error while dowloading excel using weblogic server

Navaneetha Krishnan Sathasivam
Greenhorn

Joined: Aug 29, 2013
Posts: 1
Dear Coders,

I am generating the report in xlsx extension using weblogic 9.2.3 server and when i download tha excel file in client side i got the error like

"Excel cannot open the file 'filename.xlsx' because the file format or file extension is not valid. Verify the file has not been corrupted and that the file extension'matches the file format of the file."

The same code run perfectly in tomcat6.0 but if i run in weblogic 9.2.3 and i got the above specified error.


Please let me know if anyone knows the solution.

Thanks In Advance :)
anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 98

The Mime type for Xlsx is different from Xls. You can try putting the below entry in web.xml.

<mime-mapping>
<extension>xlsx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
</mime-mapping>

Regards,
Anandraj

Regards,
Anandraj
http://weblogic-wonders.com
Follow us on facebook:
https://www.facebook.com/weblogicwonders
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while dowloading excel using weblogic server
 
Similar Threads
excel
Error while downloading .xlsm excel sheet through a popup window
Firefox appends .xls to a csv download
Read a .xls,.xlsx file format using XSSF
creating enlarged image in excel using java