How to change the direction of text in a table in a Word document created using Apache Poi? example
Asked
Active
Viewed 116 times
1 Answers
0
The text direction settings in XWPFTableCell are still not implemented. But with the help of getCTTc we can get the base object CTTc. And from this we can set addNewTcPr (), addNewTextDirection ().
to use org. openxmlformats.schemas.spreadsheetml.x2006.main.CTTextDirection this example requires a full Bank of all schemas ooxml-schemas-1.3.jar XWPFTableCell tableCell = table.getRow(r).getCell(c);
tableCell.getCTTc().addNewTcPr().addNewTextDirection().setVal(STTextDirection.BT_LR);
paragraph = tableCell.getParagraphArray(0);
run = paragraph.createRun();
run.setText("text");

Александр
- 9
- 1