Hello guys,
I request permission to expose a problem.
When i try to add an value of TimeSpan greather than 24 hours, exists an problem to converto to OADate, in internals of EPPlus.
Conversion causes a OverflowException, which ends up leaving as the value 0 in xls.
To solve, i SUGGEST override this code:
d = new DateTime(((TimeSpan)v).Ticks).ToOADate();
for this:
d = DateTime.FromOADate(0).Add(((TimeSpan)v)).ToOADate();
this solved problem for me.
Thanks a lot for this project, EPPlus is amazing...
I request permission to expose a problem.
When i try to add an value of TimeSpan greather than 24 hours, exists an problem to converto to OADate, in internals of EPPlus.
Conversion causes a OverflowException, which ends up leaving as the value 0 in xls.
To solve, i SUGGEST override this code:
d = new DateTime(((TimeSpan)v).Ticks).ToOADate();
for this:
d = DateTime.FromOADate(0).Add(((TimeSpan)v)).ToOADate();
this solved problem for me.
Thanks a lot for this project, EPPlus is amazing...