You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Rainer Kress <Ra...@Dynaware.de> on 2008/06/09 17:52:57 UTC

cloneSheet Error?

Dear POI developers,

we are using the cloneSheet method within an existing excel file, which
contains some pictures (GIFs, BMPs etc.).
After executing this method there are only place holders (red cross: The
picture cannot be displayed…)
in the cloned sheet, which have the positions and sizes of the images in the
original sheet.
Could you please tell us, how it is possible to get pictures cloned after
the cloneSheet() method or whether this
feature is not supported?

Furthermore we have tried to copy existing pictures using the following code
after executing cloneSheet():

1. Create drawing patriarch
  HSSFPatriarch patr = clonedSheet.createDrawingPatriarch();

2. Use patriarch
  HSSFClientAnchor anchor = new HSSFClientAnchor(0,0, 600,245, (short)1,1,
(short)1,2);
  anchor.setAnchorType(3);
  patr.createPicture(anchor, 0);

This code snippet is supposed to copy the first picture from the worksheet
to the cloned sheet.
But it doesn’t work! Could you explain us, how we can copy some pictures
from the worksheet 
to other sheets?

Mit freundlichen Grüßen / kind regards
Rainer




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