Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Coping a chart from one Excel to another using POI.  RSS feed

 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All...

I am trying to copy a Chart from one Excel to another using HSSF POI. Here is what I been trying out ...

My question in particular is how does the chart.createBarChart work? Does it allow you to create a new chart in any document or only in that document from which the chart object (chartList) has been retrieved.

BTW - The above code throws me an null pointer exception when I try to write the excel using tempWB.write(out);

I got a second question - Is there any way to just copy an entire sheet in POI from one work book to another. Currently I am reading each cell - determining its type - copying the style and so on. Is there any way to just copy the entire sheet as is without bothering what its content is?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!