aspose file tools*
The moose likes JSP and the fly likes Excel Charts and JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
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: 61662
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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: 61662
    
  67

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://aspose.com/file-tools
 
subject: Excel Charts and JSPs