This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes Excel Charts and JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Excel Charts and JSPs" Watch "Excel Charts and JSPs" New topic
Author

Excel Charts and JSPs

Brian Quinn
Ranch Hand

Joined: Dec 23, 2003
Posts: 32
I have a project that needs to produce a line graph using data from a query. The data and the chart need to be ateast downloadedable to Excel. I have figured a way to use a Excel template and POI to modify the data, but this will be a web application, so I need the resulting Excel file to be displayed on a JSP. Is there a way for a JSP to display an Excel file that contains a graph ?
john smith
Ranch Hand

Joined: Mar 04, 2004
Posts: 75
Displaying the excel sheet is easy enough - just embed the object reference in your HTML. However if you have to build the spreadsheet then display it, this is very awkward. I had a simmilar requirement a few years back and the work involved made it not worthwhile. In the end we used Corda's Popcharts product and ditched Excel all together. Its pretty good for generating graphical displays.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
If you have an Excel file created using POI, it's simply a matter of creating a servlet that streams that file to the client (setting the correct content-type).
If you embed a reference to the servlet in your JSP (I think you'll need an object tag to the excel ActiveX control) that's all there is to it (or easier, just a link popping up in a new window and let IE figure out how to display it).


42
joe woods
Greenhorn

Joined: Mar 05, 2006
Posts: 7
There have many third componets which support excel very well
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

Responding to questions that are over 2 years old is not really necessary.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
joe woods
Greenhorn

Joined: Mar 05, 2006
Posts: 7
But just now someone sent me a provate message to ask me where he can download a web chart component which supports jdbc and excel.
Peter Sin
Ranch Hand

Joined: Jan 13, 2005
Posts: 547
Why don't you also send private messages to him ?
joe woods
Greenhorn

Joined: Mar 05, 2006
Posts: 7
[Request for offline contact removed]
[ March 24, 2006: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

We'd rather that questions and answers take place in the forums. That way anyone else grappling with the same issues can benefit from the conversation.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Excel Charts and JSPs
 
Similar Threads
How to draw Fan Graphs in Excel File using a ResultSet
Saving data to Excel files
Graph
Java vs Excel
Drawing Dynamic Graph Using Java/J2EE Technology