2017-10-10 9 views
1

テキストを整列しようとしています。 ここに私の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を)それを使用したい場合、私はこのコンパイルエラーを得た:

enter image description here

+1

「CellStyle.ALIGN_RIGHT」の完全な使い方を教えてください。 –

答えて

5

あなたが探しているかもしれません

cellStyle.setAlignment(HorizontalAlignment.RIGHT);