Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!


I tried to import data from excel to sql using following method:

SQL
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO
INSERT INTO dbo.Reason_Mst (varReasonCode,varReasonDesc)
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
                'Excel 11.0;Database=\\Dbserver\DESKTOP REDIRECT\IT\vcsit26\Desktop\OPC-Masters.xls',
                'SELECT * FROM [Reject_reason$]')



But i got the error:

C++
Error while importing from excel to sql server

OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Could not find installable ISAM.".
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)".
Posted
Updated 2-May-10 23:48pm

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900