Apr 11, 2018 11:39 AM|PatriceSc|LINK
Ok so you can't convert this value and would have to check for that.
If it is unexpected, an issue is that by default the first few lines are scanned to infer a datatype for the column and if the type is not suitable for later values the driver has no other choice than to expose a DbNull value. Try
I'm not sure there is really a satisfactory solution about that. It's been a long time since then but the next time I'm doing an Excel file import I'll likely try an approach such as
https://www.codeproject.com/Articles/770240/Importing-Excel-Data-to-a-Generic-List-Using-Open (ie using an Excel Library to read the file content) rather than going through a database driver.