Александр Asked:2021-10-31 23:07:10 +0000 UTC2021-10-31 23:07:10 +0000 UTC 2021-10-31 23:07:10 +0000 UTC 使用 Apache Poi 更改 Word 文本的方向/ 772 有必要在使用 Apache Poi 创建的文档中更改表格中的文本方向,告诉我该怎么做? java 1 个回答 Voted Best Answer Александр 2021-11-06T01:18:20Z2021-11-06T01:18:20Z 找到以下解决方案。您需要下载 ooxml-schemas-1.3.jar 库(不是 ooxml-schemas-1.4.jar,因为没有 org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTextDirection) 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");
找到以下解决方案。您需要下载 ooxml-schemas-1.3.jar 库(不是 ooxml-schemas-1.4.jar,因为没有 org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTextDirection)