title: Intermixed type Null value with connection string in c#
body: <p>I am trying to read the following excel file with C#.</p>
  
  <p><a href="https://i.stack.imgur.com/e00EK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e00EK.png" alt="Excelsheet"></a></p>
  
  <p>I've tried both of these connection strings:</p>
  
  <p>First  connection string: I get the correct values for the header and null for all the other cells.</p>
  
  <pre><code>sbConnection.Provider = "Microsoft.ACE.OLEDB.12.0";
                strExtendedProperties = "Excel 12.0;HDR=Yes;";
  </code></pre>
  
  <p>Second connection string: I get incorrect values for the header and the correct ones for all the other cells.</p>
  
  <pre><code>sbConnection.Provider = "Microsoft.ACE.OLEDB.12.0";
                strExtendedProperties = "Excel 12.0;HDR=Yes;IMEX=1";
  </code></pre>
  
  <p>Using the extended properties solved my problem in reading mixed type data(header). But, now, it is not reading the decimal ,dates and percent values in my data. </p>
  
  <p>With both connection strings I get for some cells null although I have values in them. How could I modify the connection string in order to read the Excel file properly?</p>
  
  <p>Any help would be most appreciated.</p>