| | |
| | | if (!headerStyles.containsKey(key))
|
| | | {
|
| | | CellStyle style = wb.createCellStyle();
|
| | | style = wb.createCellStyle();
|
| | | style.cloneStyleFrom(styles.get("data"));
|
| | | style.setAlignment(HorizontalAlignment.CENTER);
|
| | | style.setVerticalAlignment(VerticalAlignment.CENTER);
|
| | |
| | | if (!styles.containsKey(key))
|
| | | {
|
| | | CellStyle style = wb.createCellStyle();
|
| | | style = wb.createCellStyle();
|
| | | style.setAlignment(excel.align());
|
| | | style.setVerticalAlignment(VerticalAlignment.CENTER);
|
| | | style.setBorderRight(BorderStyle.THIN);
|
| | |
| | | {
|
| | | // 创建cell
|
| | | cell = row.createCell(column);
|
| | | if (isSubListValue(vo) && attr.needMerge())
|
| | | if (isSubListValue(vo) && getListCellValue(vo).size() > 1 && attr.needMerge())
|
| | | {
|
| | | CellRangeAddress cellAddress = new CellRangeAddress(subMergedFirstRowNum, subMergedLastRowNum, column, column);
|
| | | sheet.addMergedRegion(cellAddress);
|
| | |
| | | }
|
| | | else if (value instanceof BigDecimal && -1 != attr.scale())
|
| | | {
|
| | | cell.setCellValue((((BigDecimal) value).setScale(attr.scale(), attr.roundingMode())).toString());
|
| | | cell.setCellValue((((BigDecimal) value).setScale(attr.scale(), attr.roundingMode())).doubleValue());
|
| | | }
|
| | | else if (!attr.handler().equals(ExcelHandlerAdapter.class))
|
| | | {
|