poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hannes Erven <...@gmx.at>
Subject Query HSSFShapeGroup children (was: Re: Replace image in excel file (HSSF)?)
Date Thu, 18 Aug 2011 11:44:51 GMT
Hi Yegor!,


>         HSSFPatriarch drawing = sheet.createDrawingPatriarch();
>         for(HSSFShape sh : drawing.getChildren()){
>             if(sh instanceof HSSFPicture){
>                 HSSFPicture pic = (HSSFPicture)sh;
>                 pic.setPictureIndex(newPictureIndex);


many thanks for your reply.

I'm now struggling with actually finding the HSSFPictures in the
workbook.
The picture I am looking for in the workbooks is always grouped with
text boxes and other shapes and not a "root" shape.

The HSSFShapes I get from drawing.getChildren() are all HSSFGroups with
no children.
I've been digging through the source and to me it seems POI does not
load the child shapes of such groups... ???

I'll be looking into the file format description I found here
http://chicago.sourceforge.net/devel/docs/escher/ in the afternoon and
see if I can add that.


Thanks again,
best regards

	-hannes

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


Mime
View raw message