1、对齐方式

POI3.9
style.setAlignment(CellStyle.ALIGN_CENTER);//水平对齐
style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);//垂直对齐
POI4.1.0
style.setAlignment(HorizontalAlignment.CENTER);
style.setVerticalAlignment(VerticalAlignment.CENTER);
2、边框样式

POI3.9
style.setBorderLeft(CellStyle.BORDER_THIN);
POI4.1.0
style.setBorderLeft(BorderStyle.THIN);
3、颜色索引
POI3.9
HSSFColor.WHITE.index
POI4.1.0
IndexedColors.WHITE.getIndex()
4、充填样式

POI3.9
style.setFillPattern(CellStyle.SOLID_FOREGROUND);
POI4.1.0
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
5、字体样式

POI3.9
headerFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
POI4.1.0
headerFont.setBold(true);
6、数据类型

POI3.9
Cell.CELL_TYPE_NUMERIC
POI4.1.0
CellType.NUMERI