修改Excel设置STRING单元格类型

2.X
RuoYi 2020-08-05 13:02:57 +08:00 committed by 疯狂的狮子li
parent 07a32ce3fd
commit 7d466de9ff
1 changed files with 1 additions and 1 deletions

View File

@ -467,7 +467,7 @@ public class ExcelUtil<T>
{
if (ColumnType.STRING == attr.cellType())
{
cell.setCellType(CellType.NUMERIC);
cell.setCellType(CellType.STRING);
cell.setCellValue(StringUtils.isNull(value) ? attr.defaultValue() : value + attr.suffix());
}
else if (ColumnType.NUMERIC == attr.cellType())