File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Exporting Excel from jsp:  response.setContentType(); Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic

Exporting Excel from jsp: response.setContentType();

Alicia Logan

Joined: Aug 24, 2005
Posts: 14
Actually, iam exporting data from a jsp using response.setContentType("application/vnd") and the format of the data for example i have a field named Model Number which is say 4-4-3, it is getting converted into 04/04/2003 when i open the Excel to view the exported data. Now what you have suggested is something that a user can do after the excel has been saved but i want a solution that will retain the format of the data just as it is written onto the Excel sheet. Hope i get the solution ASAP.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Your original thread (which asks this question) got moved to General Computing because this has nothing to do with JSP. Your Excel sheet would have this issue no matter what server side technology created it.
[ August 24, 2005: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Exporting Excel from jsp: response.setContentType();
jQuery in Action, 3rd edition