0

While importing data from excel 2010 into SQL Server 2012 I am getting following error:

Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error. Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". <

I am using following query:

SELECT * INTO dbo.headers 
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0' ,'Excel 12.0;Database=C:\Users\ishu.bhardwaj\Desktop\02.xlsx;HDR=YES;IMEX=1' ,'SELECT * FROM [Sheet1$]')

Regards Ishu Bhardwaj

  • Try IMPORT using IMPORT EXPORT SSMS feature instead – knkarthick24 Oct 09 '14 at 11:19
  • check the following URL http://stackoverflow.com/questions/13888082/ole-db-provider-microsoft-ace-oledb-12-0-for-linked-server-null-returned-m and hope this will help you. – Paresh J Oct 09 '14 at 11:23
  • Msg 7399, Level 16, State 1, Line 2 The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error. Msg 7303, Level 16, State 1, Line 2 Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". – Ishu Bhardwaj Oct 09 '14 at 11:42
  • Msg 7399, Level 16, State 1, Line 2 The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error. Msg 7303, Level 16, State 1, Line 2 Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". – Ishu Bhardwaj Oct 09 '14 at 11:42

1 Answers1

0

Cause 1: You may receive this error if the Excel file is currently opened.
Solution 1: Close the Excel file if it is currently opened and try executing again.

knkarthick24
  • 3,106
  • 15
  • 21