修改Excel设置STRING单元格类型

This commit is contained in:
RuoYi 2020-08-05 13:01:34 +08:00
parent c65e00a7dd
commit cf81f82e85

View File

@ -476,7 +476,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())