public static Map<String, XSSFCellStyle> createCellStyle(XSSFWorkbook wb) { Map<String, XSSFCellStyle> styleMap = new HashMap<String, XSSFCellStyle>(); Color color = new Color(255, 255, 255); Short fontSize8 = 7; Short fontSize10 = 10; Short fontSize12 = 12; Short fontSize16 = 16; styleMap.put( "normal", OoxmlUtil.createTableDataCellStyle( wb, false, false, false, false, color, fontSize10, false)); styleMap.put( "normalSize8", OoxmlUtil.createTableDataCellStyle( wb, false, false, false, false, color, fontSize8, false)); styleMap.put( "normalSize12", OoxmlUtil.createTableDataCellStyle( wb, false, false, false, false, color, fontSize12, false)); styleMap.put( "normalSize16", OoxmlUtil.createTableDataCellStyle( wb, false, false, false, false, color, fontSize16, true)); styleMap.put( "normalSizeFalse16", OoxmlUtil.createTableDataCellStyle( wb, false, false, false, false, color, fontSize16, false)); styleMap.put( "isTop", OoxmlUtil.createTableDataCellStyle( wb, true, false, false, false, color, fontSize10, false)); styleMap.put( "isTopSize16", OoxmlUtil.createTableDataCellStyle(wb, true, false, false, false, color, fontSize16, true)); styleMap.put( "isBottom", OoxmlUtil.createTableDataCellStyle( wb, false, true, false, false, color, fontSize10, false)); styleMap.put( "isLeft", OoxmlUtil.createTableDataCellStyle( wb, false, false, true, false, color, fontSize10, false)); styleMap.put( "isLeftSize16", OoxmlUtil.createTableDataCellStyle(wb, false, false, true, false, color, fontSize16, true)); styleMap.put( "isRight", OoxmlUtil.createTableDataCellStyle( wb, false, false, false, true, color, fontSize10, false)); styleMap.put( "isTopAndLeft", OoxmlUtil.createTableDataCellStyle(wb, true, false, true, false, color, fontSize10, false)); styleMap.put( "isTopAndLeftSize16", OoxmlUtil.createTableDataCellStyle(wb, true, false, true, false, color, fontSize16, true)); styleMap.put( "isTopAndRight", OoxmlUtil.createTableDataCellStyle(wb, true, false, false, true, color, fontSize10, false)); styleMap.put( "isTopAndRightSize16", OoxmlUtil.createTableDataCellStyle(wb, true, false, false, true, color, fontSize16, true)); styleMap.put( "isBottomAndLeft", OoxmlUtil.createTableDataCellStyle(wb, false, true, true, false, color, fontSize10, false)); styleMap.put( "isBottomAndLeftSize12", OoxmlUtil.createTableDataCellStyle(wb, false, true, true, false, color, fontSize12, true)); styleMap.put( "isBottomAndLeftSize16", OoxmlUtil.createTableDataCellStyle(wb, false, true, true, false, color, fontSize16, true)); styleMap.put( "isBottomAndRight", OoxmlUtil.createTableDataCellStyle(wb, false, true, false, true, color, fontSize10, false)); styleMap.put( "isBottomAndRightSize12", OoxmlUtil.createTableDataCellStyle(wb, false, true, false, true, color, fontSize12, true)); styleMap.put( "isBottomAndRightSize16", OoxmlUtil.createTableDataCellStyle(wb, false, true, false, true, color, fontSize16, true)); styleMap.put( "isLeftAndRight", OoxmlUtil.createTableDataCellStyle(wb, false, false, true, true, color, fontSize10, false)); return styleMap; }