main
黄海 2 years ago
parent a2f40ccbce
commit 6a420b4234

@ -39,8 +39,7 @@ public class CreateSummaryExcel {
AsposeUtil.addColumnByHead(wb, sheetIdx, "#DAEEF3", headFirstRow, headTotalRows, "序号", 80, dataRowsCount);
//写入序号
for (int i = dataStartRow; i < dataRowsCount; i++) {
Cell cell = sheet.getCells().getRow(i).get(0);
cell.setValue(i - dataStartRow);
sheet.getCells().get(i,0).setValue(i - dataStartRow);
}
//保存
wb.save(target);

@ -158,8 +158,7 @@ public class AsposeUtil {
style.setForegroundColor(getColor("#FFFFFF")); //处理背景色
style.setPattern(BackgroundType.SOLID);
for (int i = headFirstRow + headTotalRows; i < dataRowCount; i++) {
Row row = sheet.getCells().getRow(i);
row.get(0).setStyle(style);
sheet.getCells().get(i, 0).setStyle(style);
}
}

Loading…
Cancel
Save