I am trying to read the data from the excel file through the SQL Server 2008.
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\Hierarchy.xlsx',
'SELECT * FROM [Group$]')
Its giving me a weird error:
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Unspecified error".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
Excel sheet format is correct, path is correct. don't know why its giving me an error.