This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while dowloading excel using weblogic server

 
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic