forked from ddrilling/AsbCloudServer
Поправил метод расширения
This commit is contained in:
parent
92a909a029
commit
5d865457ec
@ -168,7 +168,10 @@ internal static class XLExtentions
|
|||||||
if (typeof(T) != typeof(DateTime))
|
if (typeof(T) != typeof(DateTime))
|
||||||
return (T)Convert.ChangeType(cell.GetFormattedString(), typeof(T), CultureInfo.InvariantCulture);
|
return (T)Convert.ChangeType(cell.GetFormattedString(), typeof(T), CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
return (T)(object)DateTime.FromOADate((double)cell.Value);
|
if (cell.Value is DateTime dateTime)
|
||||||
|
return (T)(object)dateTime;
|
||||||
|
|
||||||
|
return (T)(object)DateTime.FromOADate((double)cell.Value);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user