aspose file tools
The moose likes JSP and the fly likes Problem in exporting output of jsp to excel file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Problem in exporting output of jsp to excel file " Watch "Problem in exporting output of jsp to excel file " New topic
Author

Problem in exporting output of jsp to excel file

Mandar Velankar
Ranch Hand

Joined: Jul 31, 2006
Posts: 32
Hi,
I am using Tomcat 5.0.16 , I try to export output of jsp page (data in tabular format) to excel file. It is creating a new(empty)excel sheet but problem is my data in tabular format is not exported.Where is problem?

I already made MIME Type entry in web.xml file in conf dir.

I used following code :
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment; filename=myFilename.xls");

Surprise is above code is working for one jsp page (in different dir) but not in current page.
Where is mistake? Can anybody help me?
Thanks a lot.
Regards,
Mandar Velankar
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1318

Originally posted by Mandar Velankar:

I already made MIME Type entry in web.xml file in conf dir.


why you entered MIME type entry in web.xml. You have already defined in you jsp though?


have a look this example of JSP and Excel in javaranch..
[ January 19, 2007: Message edited by: Saif uddin ]

Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problem in exporting output of jsp to excel file
 
Similar Threads
xlxs extention does not support
Printing contents
Upload Data in Excel file
Jsp to pdf
Drawing Dynamic Graph Using Java/J2EE Technology