更新 ExcelUtil.java

读取单元格公式的值
dep_wangsr
厚积薄发 5 years ago committed by Limy
parent 300f565e8b
commit 760706ec70

@ -782,7 +782,7 @@ public class ExcelUtil<T>
Cell cell = row.getCell(column); Cell cell = row.getCell(column);
if (cell != null) if (cell != null)
{ {
if (cell.getCellTypeEnum() == CellType.NUMERIC) if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA)
{ {
val = cell.getNumericCellValue(); val = cell.getNumericCellValue();
if (HSSFDateUtil.isCellDateFormatted(cell)) if (HSSFDateUtil.isCellDateFormatted(cell))

Loading…
Cancel
Save