PPT Tables support is in progress. I'm going to commit it in a month
or so.

Can you open a bug in Bugzilla and attach your test ppt file and the
code snippet? I will include a test against it.

Yegor

> Hi, does anyone know the status on the ability to create tables with
> HSLF?  I think this question was last asked by Prashanth Bhat and
> answered by Yegor Kozlov on Oct 24, 2006.  I can create a ShapeGroup
> with TextBoxes and it looks like a table, but it doesn't act like a
> table.

> Also, I tried importing a PPT with a preexisting table (created with
> PowerPoint) and I ran into a problem; I tried looping through all the
> TextBoxes and writing into it, and it turned out that if I wrote into
> more than 22 TextBoxes, I would get this message when I tried to open
> the PPT file:

> "PowerPoint was unable to display some of the text, images, or objects
> on slides in the file, filename.ppt, because they have become
> corrupted. Effected slides have been replaced by blank slides…"

> When the PPT opens, I just get a blank slide.  If I only write into 22
> TextBoxes or less, it works fine.  No Exceptions are being thrown or
> anything, there is only a problem when I open the PPT file. Also, it
> seems to be only possible to edit a TextBox if it has text in it
> already.  So I created my Table with a single zero (0) in each cell.
> Here is a code snippet of what I am doing:

> //aShapeGroup is a table created in PowerPoint with 52 cells, 13x4
> org.apache.poi.hslf.model.Shape[] shg = aShapeGroup.getShapes();

> //replace shg.length with 22 and 23 to test. 22 or less will work, 23
> or greater will not.
> for(int i=0; i < shg.length; i++) {
>         if
> (shg[i].getClass().getName().equals("org.apache.poi.hslf.model.TextBox"))
>                 //all this does it write the index into the TextBox
>                 tb.setText(String.valueOf(i));
>         }
> }

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to