Excel导出类型NUMERIC支持精度浮点类型

master
RuoYi 4 years ago
parent 9652906954
commit 33793d8eff
  1. 2
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@ -503,7 +503,7 @@ public class ExcelUtil<T>
else if (ColumnType.NUMERIC == attr.cellType())
{
cell.setCellType(CellType.NUMERIC);
cell.setCellValue(Integer.parseInt(value + ""));
cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
}
}

Loading…
Cancel
Save