Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error while dowloading excel using weblogic server  RSS feed

 
Navaneetha Krishnan Sathasivam
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 98
Oracle Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!