Thread

Posted on Wed Mar 21 17:44:32 2007 by cajun
How to change text style of cell
How do you change the text style of an individual cell in oowriter table?
$c->cellSpan("vuln$i",0,0,2); $c->cellStyle("vuln$i", 0, 0, "Table3.A1"); my $cell=$c->getCell("vuln$i",0,0); $c->updateCell($cell, $vuln);

cellSpan - spans across columns.
cellStyle - changes border, background etc.
getCell - returns the cell element
updateCell - changes text within the cell

Am I missing something?
Direct Responses: 4647 | Write a response
Posted on Wed Mar 21 18:32:23 2007 by jmgdoc in response to 4644
Re: How to change text style of cell
The text of a cell is contained in one or more paragraphs.
One can retrieve the paragraph(s) of a cell using getCellParagraph() or getCellParagraphs(); see the OpenOffice::OODoc::Text manual page for details about these methods.
Then it's easy to change the style of any selected cell paragraph the same way as the style of any other paragraph, using textStyle() for example.
Direct Responses: 4649 | Write a response
Posted on Wed Mar 21 20:05:54 2007 by cajun in response to 4647
Re: How to change text style of cell
It worked, thanks! So many methods...so little time. ;-)

my $cellPara=$c->getCellParagraph($cell); $c->textStyle($cellPara,'Heading 4');


Awesome API!
Write a response