Home > database >  Ms sqlserer using OpenDataSource import excel failure
Ms sqlserer using OpenDataSource import excel failure

Time:09-22

Dear Daniel, in the use of OpenDataSource excle try to import, always prompt error, many methods are tried, not all,

A, the method a

- 1. Open the remote query support
The exec sp_configure 'show advanced options, 1
Reconfigure
The exec sp_configure 'Ad Hoc Distributed Queries', 1
Reconfigure
12.0 -- 2. Links to Excel, Microsoft ACE OLE DB Provider read Excel data (note that Excel must shut down in advance)

Select * from
Openrowset (' Microsoft. ACE. The OLEDB. 12.0 ', 'Excel 12.0; HDR=Yes; The DATABASE=E: \ a.x ls' Sheet1 $);


prompt error:
Message 7302, level 16, state 1, line 9
Unable to create the link server "(null)" OLE DB access interface "Microsoft. ACE. The OLEDB. 12.0", the instance of the


Second, method 2
SELECT *
The FROM OPENDATASOURCE (
'Microsoft. Ace. The OleDb. 12.0',
'Extended Properties="Excel 10.0; HDR=YES; IMEX=1 "; Data Source="E: \ a.x ls" '
)... [sheet1 $]

prompt error

Message 7302, level 16, state 1, line 1
Unable to create the link server "(null)" OLE DB access interface "Microsoft. Ace. The OleDb. 12.0", the instance of the


Three, method 3
SELECT *
The FROM OpenDataSource (' Microsoft. Jet. The OLEDB. 4.0 ',
'Data Source="E: \ a.x ls"; User ID=Admin; Password=; Extended properties=Excel 5.0 ')... [sheet1 $]

prompt error
Message 7308, level 16, state 1, line 1
Because OLE DB access interface '. Microsoft Jet. The OLEDB. 4.0 'unit configured to in single-threaded mode, so the access interface cannot be used for distributed query,




  • Related