title: Format of the initialization string does not conform to the OLE DB specification
body: <p>I'm getting the following error when trying to read an Excel file using a third-party component</p>
  
  <blockquote>
    <p>Format of the initialization string does not conform to the OLE DB specification</p>
  </blockquote>
  
  <p>Now, I know the words "third party component" are going to set off alarm bells here, but hear me out. </p>
  
  <p>Here's the connection string I'm using </p>
  
  <pre><code>Provider=Microsoft.ACE.OLEDB.12.0;
  Data Source=C:\users\rory\downloads\testdb_4.xls;
  Extended Properties='Excel 8.0;HDR=YES;';
  </code></pre>
  
  <p>I've got this <em>exact</em> connection string to work no problem with the following C# code</p>
  
  <pre><code>using (OleDbConnection conn = new OleDbConnection())
  {
      DataTable dt = new DataTable();
      conn.ConnectionString = connstring;
      using (OleDbCommand comm = new OleDbCommand())
      {
          comm.CommandText = "select * from [TEST_DB$]"; 
          // TEST_DB is the name of the sheet
          comm.Connection = conn;
          using (OleDbDataAdapter da = new OleDbDataAdapter())
          {
              da.SelectCommand = comm;
              da.Fill(dt);
              // do stuff with dt
          }
      }
  }
  </code></pre>
  
  <p>This works as expected, and the datatable is filled with data from the Excel file. However when I try to access it from the component, I get the error above. </p>
  
  <p>I'm not an expert on OLE DB, but I was under the impression that the drivers are at the OS level and if they work for one app / connection string they should work for all apps with that same connection string. Am I wrong? And if so, does anyone have a clue what's going on here? </p>
  
  <p>I have contacted support for the component.</p>