if (cell.isUnderline()) {
font.setUnderline(Font.U_SINGLE);
}
XSSFCellStyle style = workbook.createCellStyle();
style.setAlignment(this.getAlignment(cell.getAlignment()));
style.setVerticalAlignment(this.getVerticalAlignment(cell.getVerticalAlignment()));
style.setWrapText(cell.isWrap());
style.setFont(font);
if (cell.getLeftBorder() != null) {
style.setBorderLeft((short) cell.getLeftBorder().getWidth());
style.setLeftBorderColor(this.getColor(cell.getLeftBorder().getColor()));
}
if (cell.getTopBorder() != null) {
style.setBorderTop((short) cell.getTopBorder().getWidth());
style.setTopBorderColor(this.getColor(cell.getTopBorder().getColor()));
}
if (cell.getRightBorder() != null) {
style.setBorderRight((short) cell.getRightBorder().getWidth());
style.setRightBorderColor(this.getColor(cell.getRightBorder().getColor()));
}
if (cell.getBottomBorder() != null) {
style.setBorderBottom((short) cell.getBottomBorder().getWidth());
style.setBottomBorderColor(this.getColor(cell.getBottomBorder().getColor()));
}
if (cell.getBackgroundColor() != null) {
style.setFillForegroundColor(this.getBackgroundColor(cell.getBackgroundColor()));
style.setFillPattern(CellStyle.SOLID_FOREGROUND);
}
switch (cell.getType()) {
case BLANK:
c.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_BLANK);