!568 style重复赋值

Merge pull request !568 from coverme/N/A
This commit is contained in:
若依 2022-09-09 01:25:22 +00:00 committed by Gitee
commit 5bcd2825b6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -808,7 +808,6 @@ public class ExcelUtil<T>
if (!headerStyles.containsKey(key)) if (!headerStyles.containsKey(key))
{ {
CellStyle style = wb.createCellStyle(); CellStyle style = wb.createCellStyle();
style = wb.createCellStyle();
style.cloneStyleFrom(styles.get("data")); style.cloneStyleFrom(styles.get("data"));
style.setAlignment(HorizontalAlignment.CENTER); style.setAlignment(HorizontalAlignment.CENTER);
style.setVerticalAlignment(VerticalAlignment.CENTER); style.setVerticalAlignment(VerticalAlignment.CENTER);
@ -842,7 +841,6 @@ public class ExcelUtil<T>
if (!styles.containsKey(key)) if (!styles.containsKey(key))
{ {
CellStyle style = wb.createCellStyle(); CellStyle style = wb.createCellStyle();
style = wb.createCellStyle();
style.setAlignment(excel.align()); style.setAlignment(excel.align());
style.setVerticalAlignment(VerticalAlignment.CENTER); style.setVerticalAlignment(VerticalAlignment.CENTER);
style.setBorderRight(BorderStyle.THIN); style.setBorderRight(BorderStyle.THIN);