Hello :-)
I change a table in a word-document with poi.
Anybody haven an idea how could I change the font-size/font of my text in each cell?
Best regards and thanks for reading it,
Louisa
I change a table in a word-document with poi.
Anybody haven an idea how could I change the font-size/font of my text in each cell?
Code:
private void adText2Table(XWPFDocument doc, String text, int row, int cell, int tableIdx) {
XWPFTableRow xWPFTableRow;
XWPFTable table = doc.getTables().get(tableIdx);
List<XWPFTableRow> zeile = table.getRows();
if (zeile.size() >= row + 1) {
xWPFTableRow = zeile.get(row);
} else {
xWPFTableRow = doc.getTables().get(tableIdx).createRow();
}
xWPFTableRow.getCell(cell).setText(text);
}
Louisa