title: How to get rid of the exception "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine" in Win 7
body: <p>I am running an ASP.NET C# application on .NET 4.0 framework using VS2010 on a Win 7 machine.  Within my code I want to link Excel file with "DataTable" object. ie I want to access the data within Excel file and store it in DataTable object. So I used the following code snippet:</p>
  
  <p>_</p>
  
  <pre><code>_connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\"" + excelFile + "\";Extended Properties='Excel 8.0; HDR=NO; IMEX=1'";
          }
  
  DataTable table = new DataTable();
              OleDbCommand command = new OleDbCommand();
              command.Connection = new OleDbConnection(_connectionString);
              command.CommandType = CommandType.Text;
              command.CommandText = "select * from [NameOFExcelSheet$A1:D20]";  // Want to read the Excel sheet. The name of Excel sheet is "NameOfExcelSheet". Wan to read the celles in the range A1 and D20.
  
              OleDbDataAdapter adapter = new OleDbDataAdapter();
              adapter.SelectCommand = command;
              adapter.Fill(table);  // EXCEPTION OCCURS IN THIS LINE. 
  </code></pre>
  
  <p>I installed the exe available at the link <a href="http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&amp;displaylang=en" rel="nofollow">http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&amp;displaylang=en</a></p>
  
  <p>But still I am gettin the same exception msg while running my code. 
  The exception that I am getting is <strong>"The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine"</strong></p>
  
  <p>PLz help me with this.   </p>
  
  <p>THANKS IN ADVANCE.</p>