Thanks for the Reply.

By using EscherContainerRecord i m able to get a data about the Shape.
Data like shapeName (EscherSpRecord) and Shape information
(EscherOptRecord).

code :

EscherAggregate escherAggregate = sheet.getDrawingEscherAggregate();

 EscherContainerRecord _escherContainer =
escherAggregate.getEscherContainer();

EscherOptRecord escherOptRecord = (EscherOptRecord)
escherAggregate.findFirstWithId(EscherOptRecord.RECORD_ID);

.............

but this is giving me data for only 1 shape in the sheet. is there a way in
which i can know how many shapes are there in a sheet and can get data for
all those shape using EscherContainerRecord ?


On Thu, Feb 2, 2012 at 2:36 PM, Yegor Kozlov-4 [via Apache POI] <
[email protected]> wrote:

> Unfortunately, POI does not fully support reading properties of shapes
> from binary Excel files (.xls).
> This is a rather fundamental limitation of POI-HSSF: it can create
> simple drawings from scratch, but cannot modify or read existing ones.
>
> reading basic shape properties is simple:
>
> HSSFPatriarch drawing = sheet.getDrawingPatriarch();
> for(HSSFShape sh :  drawing.getChildren()){
>      HSSFAnchor anchor = sh.getAnchor(); // position of the shape on the
> sheet
>
>     if(sh instanceof HSSFTextbox){
>      ....
>     } else if instanceof HSSFPicture){
>     ...
>    }
> }
>
> getting adjustment values and formatting (color, border, etc.) is not
> supported.
>
> Yegor
>
> On Thu, Feb 2, 2012 at 12:38 PM, pratik sharma <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5450079&i=0>>
> wrote:
> > Hi i am looking for a sample code to Render Shape and get data about the
> > Shape (Data like Shape Name, Adjustment value, height, width etc) for
> 2003
> > excel.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5450079&i=1>
> For additional commands, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5450079&i=2>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-poi.1045710.n5.nabble.com/Rendering-Shapes-for-2003-excel-tp5450023p5450079.html
>  To unsubscribe from Apache POI, click 
> here<http://apache-poi.1045710.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2280728&code=c2hhcm1wcmF0aWtAZ21haWwuY29tfDIyODA3Mjh8LTg1MjcxMjcyMw==>
> .
> NAML<http://apache-poi.1045710.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Rendering-Shapes-for-2003-excel-tp5450023p5450172.html
Sent from the POI - User mailing list archive at Nabble.com.

Reply via email to