This week's book giveaway is in the Open Source forum.
We're giving away four copies of RabbitMQ in Depth and have Gavin Roy on-line!
See this thread for details.
The moose likes Java in General and the fly likes java to create charts in excel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java to create charts in excel" Watch "java to create charts in excel" New topic

java to create charts in excel

Achal Jalan

Joined: Nov 23, 2004
Posts: 21

I need to be able to create excel charts in a wrkbook using java.

Any clues or sample code ?

Thanks in advance
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

POI give you access to Excel in a Java environment. However, I can't remember if VBA stretches to creating charts. I suspect not, but someone may correct me.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
You can't create an excel chart with Java using POI, but if you already have a chart template in an excel file then you can modify the data and those changes will be reflected in the chart.
VBA does have a Chart object but I don't know how you access that with Java
[ March 23, 2005: Message edited by: Nigel Browne ]
Achal Jalan

Joined: Nov 23, 2004
Posts: 21
Thanks for the suggestion. I think i will go about doing that, the only problem I have is time. So if there exists any sample code to read from and update spreadheets using POI it will be very very very helpful.

Cheers guys
I agree. Here's the link:
subject: java to create charts in excel