Insert data from Excel file through OPENROWSET function.
INSERT INTO XXX_temp( A,B) SELECT [A],[B] FROM OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\CLASUploadXLS\Client_Refresh_052611nh.xls', 'SELECT * FROM [Client List$]') But it is giving the below issue. I don't know how to fix it? Could you please help me in this regards. error: > OLE DB provider > "Microsoft.Jet.OLEDB.4.0" for linked > server "(null)" returned message > "Unspecified error". Cannot initialize > the data source object of OLE DB > provider "Microsoft.Jet.OLEDB.4.0" for > linked ser I Tried the below solutions 1. restart of system 2. reconfugaring the openrow and opendatasource. 3. Execution of ole automation procedure Still the issue is there. Could you please help me in this regard.
> ...linked server "(null)"...... this means it can't even 'find' what you are trying to use as a source, either because it is locked/denied/non-existant. I would expect this error if the Excel sheet was already open. If it is not open, then check the filename and path, and finally any permissions to that file and path.