Solved

Writing struts jsp output to csv/xls

Posted on 2010-11-19
3
654 Views
Last Modified: 2013-11-24
I have a struts jsp page which shows up a table with some data. I would like to have a button like 'Write CSV' or 'Write excel' in the same page, to write the table content as csv/xls file in the client machine. Please help me with the idea and write logic(without javascript).
Thanks,
Ganesh.
0
Comment
Question by:ganeshaneesh
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
sam2912 earned 250 total points
ID: 34180026
This type of operation cannot be done using JavaScript. It has to be done on the server-side, and the output file downloaded to client.
0
 

Author Comment

by:ganeshaneesh
ID: 34180040
I understand, but I expect sample code.
-Aneesh.
0
 
LVL 14

Assisted Solution

by:sam2912
sam2912 earned 250 total points
ID: 34180305
There are many libraries available which read/write CSV files. You can try these:
http://opencsv.sourceforge.net
http://sourceforge.net/projects/javacsv
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How  can  i  resolve  HTTP Status 404 -? 8 42
Obtaining data on ASP 8 28
Asp in script 6 37
Show Ruler in Outlook 2010 STILL NOT SHOWING! 4 23
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question