title: Diagnosing an OLEDB exception when Quering Excel 2010
body: <p>To query an excel sheet via SQL, I used to use either:</p>
  
  <pre><code>Dim excelConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strPath + ";Extended Properties=""Excel 8.0;IMEX=1;HDR=YES;"""
  </code></pre>
  
  <p>or</p>
  
  <pre><code>Dim excelConnectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " + strPath + ";Extended Properties=""Excel 12.0;IMEX=1;HDR=YES;"""
  </code></pre>
  
  <p>Now this worked fine until I installed Office 2010.</p>
  
  <p>Now I get a</p>
  
  <blockquote>
    <p>Microsoft.Ace.OLEDB.12.0 provider is not registered on this machine 
    exception.</p>
  </blockquote>
  
  <p>How can I find out the correct connection string/provider?</p>