title: Apache poi center align
body: <p>I am trying to align text. However, the text is not aligned.</p>
  
  <pre><code>Cell lastCell = lastCell = row.createCell(cellNumber++);
  if (value != null) {
      lastCell.setCellValue(value);
  }
  CellStyle cellStyle = lastCell.getCellStyle();
  cellStyle.setAlignment(CellStyle.ALIGN_RIGHT);
  lastCell.setCellStyle(cellStyle);
  </code></pre>