You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by am...@ubs.com on 2013/03/08 19:02:03 UTC
HSLF Table -- Modifying a table cell
Hi,
I have an existing powerpoint template. I am trying to read a table
(which has a predefined header and few empty rows) and add Text to the
cells.
Slide slide = ppt.getSlides()[4];
Table table = (Table) slide.getShapes()[1];
TableCell cell = table.getCell(3, 0);
Cell.setText("Hello")
When I open the output ppt, my original table is unchanged. I don't see
the value "Hello" where I want.
I played a lot with the font, setting the same text through textruns
etc.. But still don't see my cell changed from blank to "Hello".
I was able to fill the target cell by some color though. Somehow, my
text never shows up.
Pls help
Thanks
Amey
RE: HSLF Table -- Modifying a table cell
Posted by am...@ubs.com.
Looking closely from java debug view,
I see that after I set the text (Hello),
Under tablecell._txBox
_children.TextByteAtom array reflects my change
_escherRecord does not reflect any change
Am I missing anything?
Amey
> _____________________________________________
> From: Dharurkar, Amey
> Sent: Friday, March 08, 2013 1:02 PM
> To: 'user@poi.apache.org'
> Subject: HSLF Table -- Modifying a table cell
>
> Hi,
>
> I have an existing powerpoint template. I am trying to read a table
> (which has a predefined header and few empty rows) and add Text to the
> cells.
>
> Slide slide = ppt.getSlides()[4];
> Table table = (Table) slide.getShapes()[1];
> TableCell cell = table.getCell(3, 0);
> Cell.setText("Hello")
>
> When I open the output ppt, my original table is unchanged. I don't
> see the value "Hello" where I want.
>
> I played a lot with the font, setting the same text through textruns
> etc.. But still don't see my cell changed from blank to "Hello".
>
> I was able to fill the target cell by some color though. Somehow, my
> text never shows up.
>
> Pls help
>
> Thanks
> Amey