• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 696
  • Last Modified:

Writing struts jsp output to csv/xls

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
ganeshaneesh
Asked:
ganeshaneesh
  • 2
2 Solutions
 
sam2912Commented:
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
 
ganeshaneeshAuthor Commented:
I understand, but I expect sample code.
-Aneesh.
0
 
sam2912Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now