|
|
|
@ -186,11 +186,6 @@ public class ExcelUtil<T> |
|
|
|
*/ |
|
|
|
private Map<Integer, Double> statistics = new HashMap<Integer, Double>(); |
|
|
|
|
|
|
|
/** |
|
|
|
* 数字格式 |
|
|
|
*/ |
|
|
|
private static final DecimalFormat DOUBLE_FORMAT = new DecimalFormat("######0.00"); |
|
|
|
|
|
|
|
/** |
|
|
|
* 实体对象 |
|
|
|
*/ |
|
|
|
@ -861,6 +856,7 @@ public class ExcelUtil<T> |
|
|
|
style = wb.createCellStyle(); |
|
|
|
style.setAlignment(HorizontalAlignment.CENTER); |
|
|
|
style.setVerticalAlignment(VerticalAlignment.CENTER); |
|
|
|
style.setDataFormat(dataFormat.getFormat("######0.00")); |
|
|
|
Font totalFont = wb.createFont(); |
|
|
|
totalFont.setFontName("Arial"); |
|
|
|
totalFont.setFontHeightInPoints((short) 10); |
|
|
|
@ -1442,7 +1438,7 @@ public class ExcelUtil<T> |
|
|
|
{ |
|
|
|
cell = row.createCell(key); |
|
|
|
cell.setCellStyle(styles.get("total")); |
|
|
|
cell.setCellValue(DOUBLE_FORMAT.format(statistics.get(key))); |
|
|
|
cell.setCellValue(statistics.get(key)); |
|
|
|
} |
|
|
|
statistics.clear(); |
|
|
|
} |
|
|
|
|