poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Lundström <erik.lundst...@solme.se>
Subject Adding images to Excel sheet with existing Chart - is this possible?
Date Mon, 24 Aug 2009 08:03:37 GMT
Hello,

I recently (August 21) posted a message with the same subject on the "user" group, and was
advised to post a follow-up on the dev group.

My problem - in short - is that I need to be able to write images to a Sheet where there is
also a chart present in my "Excel template" file. 

Using various tests (my "real" Excel template and stripped versions of it, as well as more
simplistic templates with only "empty" charts in them) has lead me to the depressing conclusion
that there is a Catch22 here: Charts must be present from scratch in the Excel template file
(as by the given limitations in the POI (HSSF+XSSF) project), but writing images to a Sheet
in a Workbook where there are charts just isn't possible. (I have succeeded to write images
to a Sheet when there are charts on OTHER sheets, but never when there is a chart present
on the "image sheet" itself).

The person replying on my message on the "user" group stated that "I know why the images are
missing when you try to add them to a sheet that contains a chart - the required records are
simply not created. I also think that I know why; I think that the drawing records are parsed
when the method is called and this both corrupts the chart data and the drawing aggregate
records themselves."

I would be very grateful if somebody here could clarify the image/chart problem! Can one make
them co-exist, or must I use an external workaround (like having a macro reading the images
afterwards to the Sheet). All other suggestions are highly welcome, of course.

I have been using POI 3.5 Beta6.

Source is here (standalone example, images and the various Excel templates I have tried):

http://uploading.com/files/HOJ1VIKT/POITest.zip.html


Thanks

Erik

________________________________
Erik Lundström

SOLME AB
Skeppsbron 4
SE-411 21 GÖTEBORG, SWEDEN

Direct/Mob:    +46 70 917 48 03 
Solme HQ:     +46 31 711 52 20
Support:         +46 31 760 64 20
Fax:                +46 31 711 52 23
E-Mail:            erik.lundstrom@solme.se



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message