DBNull in non-empty cell when reading Excel file through OleDB
问题 I use OleDB to read an Excel file. One of the columns has a "Common" format and contains both strings with letters and values consisting of numbers only. String values are retrieved without problem, but pure numerical values are retrieved as DBNull . How to solve? I use the following connection string to open Excel 2003 file (xls): "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\file.xls; Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\"" 回答1: I found some documentation on Microsoft's