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

Import Excel Spreadsheet

$
0
0

Using Microsoft SQL Server 2008 R2

Microsoft SQL Server Management Studio		10.50.1600.1
Microsoft Analysis Services Client Tools	10.50.1600.1
Microsoft Data Access Components (MDAC)		3.85.1132
Microsoft MSXML					2.6 3.0 4.0 6.0 
Microsoft Internet Explorer			8.0.6001.18702
Microsoft .NET Framework			2.0.50727.3655
Operating System				5.1.2600


Trying to import Excel spreadsheets to SQL servers

Tried

SELECT *
FROM   OPENROWSET('Microsoft.Jet.OLEDB.4.0',
 'Excel 12.0 Xml;HDR=YES;Database=C:\Documents and Settings\ebrnhg6\My Documents\Excel\ATM_Cash_Outages.xlsx',
       'SELECT * FROM [Cash_Outages.xlsx]')
Get 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.

and

SELECT *
FROM   OPENROWSET('Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0 Xml;HDR=YES;Database=C:\Documents and Settings\ebrnhg6\My Documents\Excel\ATM_Cash_Outages.xlsx',
       'SELECT * FROM [Cash_Outages.xlsx]')
Get error
Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.

Not sure which is the correct one to use or how to fix the error.

Would appreciate any help with this.

Thank you,

John 


Viewing all articles
Browse latest Browse all 1519

Trending Articles



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