title: Import data from Excel to SQL Server using vb.net
body: <p>I am importing data from Excel into a SQL Server database using vb.net. In my Excel file, in column <code>bNumber</code>, there are values of different types i.e some are numbers and some are text:</p>
  
  <pre><code>Telenorx
  Telenorx
  8
  97150219924
  97150219924
  97150219924
  97150219924
  Easypayx
  92
  </code></pre>
  
  <p>When I select the data from Excel through <code>OleDbCommand</code>, it retrieves numbers correctly but text values as blank. </p>
  
  <p>In Excel, the column's data type is <code>General</code>.</p>
  
  <p>This is my code to retrieve data from Excel.</p>
  
  <pre><code>excelConn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data 
  Source= " + OpenFileDialog1.FileName + ";Extended Properties=""Excel 12.0 
  Xml;HDR=Yes""")
  Dim oleDbCommand As OleDbCommand = New OleDbCommand("Select bNumber from 
  [Sheet1$]", excelConn)
  excelConn.open()
  Dim dataReader = oleDbCommand.ExecuteReader 
  dataReader.read()
  </code></pre>