• Post Reply Bookmark Topic Watch Topic
  • New Topic

CSV (comma separated value) File, Excel and JSP......

 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys, i intend to implement the following in my JSP.
1.Populate the screen after running a query with
say, three fields -- X, Y , Z or more
2.Sum the three columns and display at bottom
3.Provide a link on screen, when user clicks on this link i want to download the results on screen as a CSV file
4.Then open CSV in EXCEL as a graph(e.g. pie,bar chart etc), depending the most suitable chart for
Screen results.
Could anyone give me ideas ,logic, references,or issues which may result from this kind of implementation.Cheers.
 
Geoff Tate
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the POI project at jakarta.apache.org - also I remember seeing someone had written some routines to generate a csv file - ostermiller was his name I think. Google that and see if you can up with it. I have used POI and works pretty well. What I did was build some templates in Excel and then used POI to create files from the templates by copying the file and populating the copy of the template. This is with a J2EE app. You can then download the file using a servlet (examples on the 'net abound) to download the csv file.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!