Click here to Skip to main content
15,908,634 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have to export data from sql server to Excel
i am using following code


SQL
INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 7.0;Database=C:\Users\manacle-03\Desktop\user.xlsx;',
'SELECT * FROM [Sheet1$]')
SELECT  *
FROM Users



I am getting Error like


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

1 solution

 
Share this answer
 

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