title: Excel to datagridview Microsoft.ACE.OLEDB.14.0
body: <p>I'm trying to fill my datagrid view from an excel sheet. The error message I'm getting here is, oledb exception was ungandled --> <code>The 'Microsoft.ACE.OLEDB.14.0' provider is not registered on the local machine.</code> I'm uisng office 2012, do i have to use any reference.</p>
  
  <p>I put <code>anycpu</code>X86 in the project properties.</p>
  
  <p>There are system files: </p>
  
  <pre><code>using System;
  using System.Data;
  using System.Drawing;
  using System.Reflection;
  using System.Collections.Generic;
  using System.Windows.Forms;
  using Excel = Microsoft.Office.Interop.Excel;
  using System.Data.OleDb;
  
  
  
  private void importXSLToolStripMenuItem_Click(object sender, EventArgs e)
          {
              OleDbConnection connect = new OleDbConnection();
  
              connect.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\test\csharp.net-informations.xls;ExtendedProperties=""Excel 14.0;HDR=YES;""";
  
              OleDbCommand command = new OleDbCommand("SELECT ID, TYPE, BeginBorder (mm),EndBorder (mm)," + "FROM [P2S2$]", connect);
  
              DataSet ds = new DataSet();
              OleDbDataAdapter adapter = new OleDbDataAdapter(command);
              adapter.Fill(ds);
              dataGridView1.DataSource = ds.Tables[0];
  
  
  
          }
  </code></pre>