Larry Brister
asked on
Excel 2007 openquery
I have a file in my C:\temp folder
File name is Test.xlsx
I'm trying to do an openquery on the file...see attached code
I installed the engine and I turned on the Ad Hoc Distributed queries with
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO
When I run my attached code I get this error message
Msg 7302, Level 16, State 1, Line 1
Cannot create an instance of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
File name is Test.xlsx
I'm trying to do an openquery on the file...see attached code
I installed the engine and I turned on the Ad Hoc Distributed queries with
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO
When I run my attached code I get this error message
Msg 7302, Level 16, State 1, Line 1
Cannot create an instance of OLE DB provider "Microsoft.ACE.OLEDB.12.0"
select * FROM OPENROWSET (
'Microsoft.ACE.OLEDB.12.0' ,
'Excel 12.0;Database=C:\temp\Test2.xlsx;HDR=YES' ,
'SELECT * FROM [Sheet1$]' )
According to your query, SQL Server is looking for a linked server named "Microsoft.ACE.OLEDB.12.0" . Have you created a link server connection to the Excel file? If so, try using the name of the link instance name without the single quotes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To clarify my comment above, the linked server connection I was referring to was to an Excel 2007 workbook.
ASKER
Agreed...throwing this over the side.
Look for next question in a moment
Look for next question in a moment