title: Unable to Open an Excel file using System.Data.OleDb.OleDbConnection
body: <p>Iam trying to open an XLSX file (so that I can create a datatable )
  Iam using the the below code.</p>
  
  <pre><code>System.Data.OleDb.OleDbConnection oleDbCon;
  System.Data.OleDb.OleDbDataAdapter oleDbDataAd;
  oleDbCon = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + filePath + "';Extended Properties=Excel 8.0;");
  </code></pre>
  
  <p>but when file path contains a file with extension xlsx , i get an error 
  "External table is not in the expected format."</p>
  
  <p>Above code works fine when file is of extention xls.</p>
  
  <p>Do I have to change the connection string ?</p>
  
  <p>Any help ?Thanks in Advance.</p>