title: "Single-threaded apartment mode" error using OPENROWSET with Excel
body: <p>I have an Excel file. I need to import that Excel file into SQL Server, I am using this Query</p>
  
  <pre><code>SELECT * 
  FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
       'Excel 8.0;Database=C:\Users\Jojin\Desktop\Products.xls', [Sheet1$]) 
  </code></pre>
  
  <p>But I am getting error like:</p>
  
  <blockquote>
    <p>Msg 7308, Level 16, State 1, Line 1 OLE DB provider
    'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries
    because the provider is configured to run in single-threaded apartment
    mode.</p>
  </blockquote>