Return-Path: X-Original-To: apmail-poi-user-archive@www.apache.org Delivered-To: apmail-poi-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3FD0DF9D for ; Thu, 2 Aug 2012 12:42:03 +0000 (UTC) Received: (qmail 48663 invoked by uid 500); 2 Aug 2012 12:42:02 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 48565 invoked by uid 500); 2 Aug 2012 12:42:02 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 48272 invoked by uid 99); 2 Aug 2012 12:42:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 12:42:02 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.161.174] (HELO mail-gg0-f174.google.com) (209.85.161.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 12:41:57 +0000 Received: by ggnl2 with SMTP id l2so1489549ggn.33 for ; Thu, 02 Aug 2012 05:41:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=/aS7Nehj1NKBiMZRvJO0eFxxWEFV9pz6NX5bDBpfNVk=; b=Oa/BZtlV32soK3Af+l71+SLlbl4Nm3l1NmTENWMrMMv0W5J+I1qjM2DBESVO8vxPkC sQF2+vxHDzaE9TG5gAk+EvSl5LDlmDkCXUWpgC5C5YiA5WsazAARVqBQCTV+oYBDjEJH uvbozsltS8iRlGFqrpksJCT+U/vZ2HHPXWzz/y/c28bOz/uDk48KkM4hpx2dFmHDFH9O IYzfcOX1rwOSAAVN6PeUpZwwkVADejI4clP9pECl15vfLOzbXbhp2R7bDkWOVxmu9VuF xtiYFg06ls42aTtXKZekoK/WM1kzaHq7hY3natqsCmTQhZ0XwxZwZtS+PQJfi+XX0/qN vyOg== MIME-Version: 1.0 Received: by 10.50.189.134 with SMTP id gi6mr3375137igc.55.1343911294835; Thu, 02 Aug 2012 05:41:34 -0700 (PDT) Received: by 10.64.81.38 with HTTP; Thu, 2 Aug 2012 05:41:34 -0700 (PDT) In-Reply-To: References: <1343906465684-5710588.post@n5.nabble.com> Date: Thu, 2 Aug 2012 16:41:34 +0400 Message-ID: Subject: Re: Problem while inserting image multiple times in a worksheet From: Yegor Kozlov To: POI Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQn989nqlVCgn4icrwCl3ggGOcR87/WUf/LF2ccsU2ukAjWsnXP6E+hQ+Jr1QfoIXwvpkb5Z X-Virus-Checked: Checked by ClamAV on apache.org There is a ongoing effort to impove drawing support in HSSF, we hope to check min these changes in two or three weeks. Stay with POI and try a build from trunk after that. Yegor On Thu, Aug 2, 2012 at 4:14 PM, harshask wrote: > I am modifying a template Sir. > > On Thu, Aug 2, 2012 at 5:34 PM, Yegor Kozlov-4 [via Apache POI] < > ml-node+s1045710n5710591h81@n5.nabble.com> wrote: > >> Are you creating a workbook from scratch or modiying a template ? >> >> >> On Thu, Aug 2, 2012 at 3:21 PM, harshask <[hidden email]> >> wrote: >> >> > Hi, >> > >> > i used the below code to display image in my excel worksheet. >> > >> > try { >> > HSSFClientAnchor anchor =3D >> > new HSSFClientAnchor(0, 0, 255, 255, (short)colNo, >> rowNo, >> > (short)++colNo, rowNo); >> > int index =3D wb.addPicture(bytes, >> > HSSFWorkbook.PICTURE_TYPE_JPEG); >> > HSSFPatriarch patriarch =3D sheet.createDrawingPatriarch()= ; >> > patriarch.createPicture(anchor, index); >> > anchor.setAnchorType(2); >> > } catch (Exception e) { >> > e.printStackTrace(); >> > } >> > >> > Image is displayed only once, in the place where its executed last. >> > >> > I read in a blog that, HSSFPatriarch patriarch =3D >> > sheet.createDrawingPatriarch(); removes all the existing shapes in the >> work >> > sheet. How can i display the same image many times in a single >> worksheet? >> > >> > Thank you, >> > Harsha >> > >> > >> > >> > >> > -- >> > View this message in context: >> http://apache-poi.1045710.n5.nabble.com/Problem-while-inserting-image-mu= ltiple-times-in-a-worksheet-tp5710588.html >> > Sent from the POI - User mailing list archive at Nabble.com. >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [hidden email] >> > For additional commands, e-mail: [hidden email] >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussio= n >> below: >> >> http://apache-poi.1045710.n5.nabble.com/Problem-while-inserting-image-mu= ltiple-times-in-a-worksheet-tp5710588p5710591.html >> To unsubscribe from Problem while inserting image multiple times in a >> worksheet, click here >> . >> NAML >> > > > > > -- > View this message in context: http://apache-poi.1045710.n5.nabble.com/Pro= blem-while-inserting-image-multiple-times-in-a-worksheet-tp5710588p5710592.= html > Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org