티스토리 뷰

Java/POI

[POI] 엑셀 가운데 정렬 설정.

M_막심 2014. 9. 17. 18:02
CellStyle style= rstWb.createCellStyle();
style.setAlignment(HSSFCellStyle.ALIGN_CENTER);        //가운데 정렬


- CellStyle.class -
  public static final short ALIGN_GENERAL = 0;
  public static final short ALIGN_LEFT = 1;
  public static final short ALIGN_CENTER = 2;
  public static final short ALIGN_RIGHT = 3;
댓글