diff --git a/src/main/java/com/xujie/sys/common/utils/ExcelTemplate.java b/src/main/java/com/xujie/sys/common/utils/ExcelTemplate.java index 05e89916..96520a3b 100644 --- a/src/main/java/com/xujie/sys/common/utils/ExcelTemplate.java +++ b/src/main/java/com/xujie/sys/common/utils/ExcelTemplate.java @@ -459,11 +459,11 @@ public class ExcelTemplate { style7.setBorderBottom(BorderStyle.NONE); style7.setBorderTop(BorderStyle.NONE); - // 判断单元格的值是否小于0,如果小于0则加粗 + // 判断单元格的值是否小于等于0,如果小于等于0则加粗 boolean isBold = false; if (c7.getCellType() == CellType.NUMERIC) { double cellValue = c7.getNumericCellValue(); - if (cellValue < 0) { + if (cellValue <= 0) { isBold = true; } } @@ -661,7 +661,7 @@ public class ExcelTemplate { int startRow = dtlRowIndex + heightInfo[0]; int endRow = dtlRowIndex + heightInfo[1]; int height = heightInfo[2]; - + for (int rowIdx = startRow; rowIdx <= endRow; rowIdx++) { XSSFRow row = sheet.getRow(rowIdx); if (row != null) {