Quantcast
Channel: SQL Server Manageability forum
Viewing all articles
Browse latest Browse all 1519

Problem in reading an excel file in SQL Server

$
0
0

Hi, 

I am using a 64 bit Win 7 machine which has 32 bit MS Office installed.

When I am trying to read a excel file in SQL server e.g.

Select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;HDR=YES;IMEX=1;Database=D:\Test.xls',
'SELECT * FROM [Sheet 1$]')

I get the below error - '

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.'

I have tried many options from different forums like configuring As Hoc Distributed queries option, etc .. but no success.

I will appreciate if someone can guide me to resolve this issue.


Viewing all articles
Browse latest Browse all 1519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>