title: Microsoft.ace.oledb.12.0 not registered on the local machine
body: <p>i have a situation in which i have to inport the Excel sheet or file to my database using vb.net i know the code and the process for doing this but the issue is</p>
  
  <ol>
  <li>I have 64 bit operating system</li>
  <li>having 32 bit MS Office</li>
  </ol>
  
  <p>and i don't want to change my Configuration from  to 86bit due to some othere reason
  so now what should i do 
  any prefer solution 
  any one face same solution like this </p>
  
  <p>my code is </p>
  
  <pre><code>Dim MyConnection As System.Data.OleDb.OleDbConnection
      Dim DtSet As System.Data.DataSet
      Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
  
      Dim fBrowse As New OpenFileDialog
      With fBrowse
          .Filter = "Excel files(*.xlsx)|*.xlsx|All files (*.*)|*.*"
          .FilterIndex = 1
          .Title = "Import data from Excel file"
      End With
      If fBrowse.ShowDialog() = Windows.Forms.DialogResult.OK Then
          Dim fname As String
          fname = fBrowse.FileName
          MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source='" &amp; fname &amp; " '; " &amp; "Extended Properties=Excel 8.0;")
          MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection)
          MyCommand.TableMappings.Add("Table", "CurrencyRate")
          DtSet = New System.Data.DataSet
          MyCommand.Fill(DtSet)
          MyConnection.Close()
          For Each Dr As DataRow In DtSet.Tables(0).Rows
          Next
          MsgBox("Successfully Saved")
  
      End If
  </code></pre>
  
  <p>but in this code i got error of </p>
  
  <blockquote>
    <p>Microsoft.ace.oledb.12.0 not registered on the local machine</p>
  </blockquote>