mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-07 21:09:33 +00:00
Excel导出类型NUMERIC支持精度浮点类型
This commit is contained in:
@@ -494,7 +494,7 @@ public class ExcelUtil<T>
|
|||||||
else if (ColumnType.NUMERIC == attr.cellType())
|
else if (ColumnType.NUMERIC == attr.cellType())
|
||||||
{
|
{
|
||||||
cell.setCellType(CellType.NUMERIC);
|
cell.setCellType(CellType.NUMERIC);
|
||||||
cell.setCellValue(Integer.parseInt(value + ""));
|
cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user