If you need the text in cells use TextRun.getText().
Does it return the correct text?

TextRun.getRichTextRuns() is supposed to return an array of runs of
text with the same styling. The size of the array of RichTextRuns should be 
greater than 0.
Could you attach your ppt file and we will look at it?

Yegor

G> Hi,

G> Using your example below, I was able to identify the number of cells
G> correctly, but the text is not coming, when I ask the length of the array of
G> RichTextRuns from the text boxes, it returns 0 (Zero).

G> Do you know why this can be happening, and a possible solution?

G> Thnx again,


G> Gerson Albuquerque

G> -----Mensagem original-----
G> De: Yegor Kozlov [mailto:[EMAIL PROTECTED] 
G> Enviada em: segunda-feira, 14 de agosto de 2006 11:26
G> Para: POI Users List
G> Assunto: Re: Extracting Tables from PowerPoint

G> Hi,

G> A table in PowerPoint is a group of shapes.
G> It HSLF API it is represented by a org.apache.poi.hslf.model.ShapeGroup
G> class.
G> Typically a table consists of TextBox and Line objects which represent
G> text runs and borders.

G> Below is sample code how to iterate over table cells:

G>  Slide slide = ...;
G>  Shape[] sh = slide.getShapes();
G>  for (int i = 0; i < sh.length; i++) {
G>    if (sh[i] instanceof ShapeGroup){ //got a table
G>      ShapeGroup table = (ShapeGroup)sh[i];
G>      Shape[] ch = table.getShapes();
G>      for (int j=0; j<ch.length; j++){
G>        if (ch[j] instanceof TextBox){
G>          TextBox txt = (TextBox)ch[j];
G>          String text = txt.getText(); //text in a table cell
G>        }
G>      }
G>    }
G>  }

G> Creating new tables is not yet supported. It's clear how to implement
G> it, just need time.
 
G> Regards, Yegor
 
G>> Hi,

 

G>> I´ve searched but haven’t found anything. Can anybody help me on how to
G>> extract Tables from PPT using POI.

 

 

G>> Thnx,

 

 

G>> Gerson Albuquerque


G> ---------------------------------------------------------------------
G> To unsubscribe, e-mail: [EMAIL PROTECTED]
G> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
G> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/







G> _______________________________________________________
G> Você quer respostas para suas perguntas? Ou você sabe muito e quer 
compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
G> http://br.answers.yahoo.com/

G> ---------------------------------------------------------------------
G> To unsubscribe, e-mail: [EMAIL PROTECTED]
G> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
G> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to