Commit 75d1872b by 厚积薄发 Committed by Gitee

更新 ExcelUtil.java

读取单元格公式的值
parent 9cf4b893
......@@ -782,7 +782,7 @@ public class ExcelUtil<T>
Cell cell = row.getCell(column);
if (cell != null)
{
if (cell.getCellTypeEnum() == CellType.NUMERIC)
if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA)
{
val = cell.getNumericCellValue();
if (HSSFDateUtil.isCellDateFormatted(cell))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment