• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Coping a chart from one Excel to another using POI.

 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic