title: how can I styling cells in Excel by Apache POI?
body: <p>I used version 3.9 of Apache POI for generate excel,and this code is correct on this:</p>
  
  <pre><code>public CellStyle getCellStyle(XSSFWorkbook workbook){
      CellStyle cellStyle = workbook.createCellStyle();
      cellStyle.setDataFormat(workbook.getCreationHelper().createDataFormat().getFormat("###,###"));
      XSSFFont font = workbook.createFont();
      font.setFontHeightInPoints((short) 11);
      font.setFontName("Tahoma");
      cellStyle.setFont(font);
      CellStyle style = workbook.createCellStyle();
      style.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP);
      cellStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      cellStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);
      cellStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);
      cellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
      return cellStyle;
  }
  </code></pre>
  
  <p>but when upgrade to 3.17و These lines have errors:</p>
  
  <pre><code>style.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP);
      cellStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      cellStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);
      cellStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);
      cellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
  </code></pre>