I have a cell with the value of type string and text "hello". I then tried to .GetValue<DateTime>() and it returns the default value of DateTime. The same with .GetValue<int>() and 0 (zero).
I expect to receive an exception, because with this behaviour I can not surely eliminate "bad" conversion errors. I read many values out of hand-made excel sheets and it's possible, that hand-made errors exist (du to input mistakes, etc.).
Comments: While this is annoying, and there could be some better options with the GetValue(of T), I think this is pretty standard in .Net - especially with dates. Since Date is not a nullable value, you'll always wind up comparing it with Date.MinValue to see if the default date was returned.
I expect to receive an exception, because with this behaviour I can not surely eliminate "bad" conversion errors. I read many values out of hand-made excel sheets and it's possible, that hand-made errors exist (du to input mistakes, etc.).
Comments: While this is annoying, and there could be some better options with the GetValue(of T), I think this is pretty standard in .Net - especially with dates. Since Date is not a nullable value, you'll always wind up comparing it with Date.MinValue to see if the default date was returned.