title: The 'Microsoft.ACE.OLEDB.14.0' provider is not registered error on Sharepoint Visual Studio WebPart while uploading a excel file
body: <p>I am creating a sharepoint webpart solution where i need to upload  a excel file</p>
  
  <p>Here is my code:</p>
  
  <pre><code>string tempFilename = "";
  
  SPSecurity.RunWithElevatedPrivileges(delegate
  {
  
    tempFilename = System.IO.Path.GetTempFileName();
    flUpload.SaveAs(tempFilename);
  
    string connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=\"Excel 8.0;HDR=No;IMEX=1\";", tempFilename);
    connectionString = @"Provider=Microsoft.ACE.OLEDB.14.0;Data Source="+tempFilename+@";ExtendedProperties=""Excel 12.0;HDR=YES;""";
  
    var adapter = new OleDbDataAdapter("SELECT * FROM [Failed Trades$]", connectionString);
    var ds = new DataSet();
  
   adapter.Fill(ds, "anyNameHere");
  
   DataTable data = ds.Tables["anyNameHere"];
  </code></pre>
  
  <p>The Connection String generated is:</p>
  
  <pre><code> Provider=Microsoft.ACE.OLEDB.14.0;Data Source=C:\Windows\ServiceProfiles
  \NetworkService\AppData\Local\Temp\Demo1.xls;
   ExtendedProperties="Excel 12.0;HDR=YES;"
  </code></pre>
  
  <p>I had looked hundrededs of solutions but none of them is workimg.</p>
  
  <p>Here are few solutions what i tried:</p>
  
  <ol>
  <li>Installed setups from microsoft (64 bit)</li>
  <li>Change the application pool with 32 bit enabled but that caused my pool to stopped again and again</li>
  </ol>
  
  <p>I checked my DSN as well
  <img src="https://i.stack.imgur.com/7Zlq3.png" alt="enter image description here"></p>