title: Importing data from Excel into SQL Server table
body: <p>I am currently using </p>
  
  <ul>
  <li>Office 2016 32-bit</li>
  <li>SQL Server 2016</li>
  </ul>
  
  <p>Steps taken:</p>
  
  <ol>
  <li>Installed <code>Microsoft.ACE.OLEDB.12.0</code> provided in a post</li>
  <li><p>Ran command</p>
  
  <pre><code>SP_CONFIGURE 'show advanced options', 1; 
  
  RECONFIGURE;
  GO  
  SP_CONFIGURE 'Ad Hoc Distributed Queries', 1; 
  
  RECONFIGURE; 
  GO 
  </code></pre></li>
  <li><p>Now I run this command:</p>
  
  <pre><code>SELECT * 
  INTO #InertTable 
  FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
                  'Excel 12.0;Database=C:\Users\Samra\Documents\..\Supervisor Grandfathering.xls',  
                  'SELECT * FROM [sheet1$]')
  </code></pre></li>
  </ol>
  
  <p>But I get an error</p>
  
  <blockquote>
    <p>The 32-bit OLE DB provider "Microsoft.ACE.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server.</p>
  </blockquote>
  
  <p>I also tried:</p>
  
  <ol>
  <li>right-clicking <strong>database -> import</strong></li>
  <li>Chose Microsoft Excel from Datasource </li>
  <li>specified file name Excel</li>
  <li>version -> Microsoft 2016</li>
  </ol>
  
  <p>Now it says <code>Microsoft.ACE.OLEDB.16.0</code> provider is not registered on local machine</p>
  
  <p>I also went to <a href="https://www.microsoft.com/en-us/download/confirmation.aspx?id=54920" rel="nofollow noreferrer">https://www.microsoft.com/en-us/download/confirmation.aspx?id=54920</a> and downloaded it, and now when I run 64-bit version to install it says</p>
  
  <blockquote>
    <p>You cannot install the 64-bit version of Microsoft Access Database Engine 2016 because you currently have 32-bit Office products installed. If you want to install 64-bit Microsoft Access Database Engine 2016, you will first need to remove the 32-bit installation of Office products....</p>
  </blockquote>
  
  <p>For which i have to ask my admin and set it up later.
  Isn't there an easy way around all this? I just need to import data from an excel into a table</p>