Apache POI - CellStyle.ALIGN_RIGHT
问题描述:
我想对齐文本。 这里我的pom.xml:Apache POI - CellStyle.ALIGN_RIGHT
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
在我的代码
:
import org.apache.poi.ss.usermodel.CellStyle;
,但是当我想用它(CellStyle.ALIGN_RIGHT
),我得到这个编译错误:
答
也许您在寻找
cellStyle.setAlignment(HorizontalAlignment.RIGHT);
请给我们提供'CellStyle.ALIGN_RIGHT'的完整用法。 –