设置表格头单元格文本形式
This commit is contained in:
parent
11320b2e13
commit
86ca404dbf
|
@ -848,6 +848,9 @@ public class ExcelUtil<T>
|
|||
headerFont.setBold(true);
|
||||
headerFont.setColor(excel.headerColor().index);
|
||||
style.setFont(headerFont);
|
||||
// 设置表格头单元格文本形式
|
||||
DataFormat dataFormat = wb.createDataFormat();
|
||||
style.setDataFormat(dataFormat.getFormat("@"));
|
||||
headerStyles.put(key, style);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue