gpt4 book ai didi

java - Apache POI - CellStyle.ALIGN_RIGHT

转载 作者:行者123 更新时间:2023-12-02 03:46:14 24 4
gpt4 key购买 nike

我正在尝试对齐文本。这是我的 pom.xml:

<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),我得到了这个编译错误:

enter image description here

最佳答案

也许您正在寻找

cellStyle.setAlignment(HorizontalAlignment.RIGHT);

关于java - Apache POI - CellStyle.ALIGN_RIGHT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46666778/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com