[jopendocument] In Table , to place value in cell as CENTRE alignment

2011-03-16 Thread Loïs
Hello

I'm trying to place value in cell as centre alignment. I don't use
template and i create my spreadsheet like : 
http://www.jopendocument.org/start_spreadsheet_1.html.
I can change the color of the cell like :

final MutableCellSpreadSheet cellule = feuille.getCellAt(col, i);
cellule.setBackgroundColor(fondEntete);

but i dont find how to change the alignment of the cell...

Thanks in Advance


[jopendocument] In Table , to place value in cell as CENTRE alignment

2010-01-28 Thread jai
I want to place cell value as centre aligment with following code , is
it posssible

File templateFile = new File(TestCase + .odt);
 File outFile = new File(TestCaseOutput + .odt);

  final ODSingleXMLDocument single = new ODPackage
(templateFile).toSingle();
Element elementTable = single.getDescendantByName(table:table,
TestCase);
//Table t=new Table(single, element)
TableODSingleXMLDocument table = new
TableODSingleXMLDocument(single, elementTable);

table.duplicateRows(1, 1, 20);
for (int i = 2; i  20; i++) {
for (int j = 0; j  4; j++) {
table.getCellAt(j, i).setValue
(i);
}
}