Skip to content

Commit 3359d30

Browse files
committed
check date format
1 parent 81a2f86 commit 3359d30

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ExcelMerge/ExcelUtility.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ private static object GetCellValue(ICell cell, CellType type)
2323
switch (type)
2424
{
2525
case CellType.Numeric:
26-
return cell.NumericCellValue;
26+
if (DateUtil.IsCellDateFormatted(cell))
27+
{
28+
return cell.DateCellValue;
29+
}
30+
else
31+
{
32+
return cell.NumericCellValue;
33+
}
2734
case CellType.String:
2835
return cell.StringCellValue;
2936
case CellType.Boolean:

0 commit comments

Comments
 (0)