I am trying to read data from excel file from SQL query and insert it in temp table but not able to read the data from Excel file. Getting Below Errors:
- 'OPENDATASOURCE' rowset provider not supported in this version of SQL Server.
- 'OPENROWSET' rowset provider not supported in this version of SQL Server.
- Linked servers are not supported in this version of SQL Server.
Below Solutions Tried:
SELECT * FROM OPENROWSET(
'Microsoft.ACE.OLEDB.12.0',
'Excel 8.0;HDR=NO;Database=T:\temp\Test.xlsx',
'select * from [sheet1$]')
SELECT * FROM OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0', 'Data Source=C:\Users\Downloads\Excel Logic File.xlsx;Extended Properties=EXCEL 12.0')..[Sheet1$];
Also Tried Executing below before running the query:
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
GO
EXEC sp_configure 'ad hoc distributed queries', 1
RECONFIGURE
GO
Getting the error( Linked servers are not supported in this version of SQL Server.) EXEC ('select * from table') at linkedserver





