You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by stargate625 <st...@gmail.com> on 2009/01/02 16:14:10 UTC

Re: status of PPT Tables support in POI-HSLF

I used the latest release of Apache POI to create a PowerPoint file with a
table.  The problem I encountered was that the table could not be displayed
correctly using my PowerPoint 2003.  The text in the table cells was based
on the default font and large size and bulleted list.  I tried to change the
font and size using the RichTextRun from each table cell.  My settings
didn't seem to have any effect.

Is this problem solved in Apache POI?



Yegor Kozlov wrote:
> 
> 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: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/status-of-PPT-Tables-support-in-POI-HSLF-tp14185184p21252519.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