Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Export SQL table data to Excel 2007
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

70 Posts

Posted - 03/25/2013 :  08:57:32  Show Profile  Reply with Quote
I have run the below mentioned query to export the data -

insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=D:\test.xlsx;HDR=YES',
'SELECT * FROM [SheetName$]') Select id,description,lookupCode FROM tblLookupMaster

But i am getting the below 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)".

Kindly help.


Flowing Fount of Yak Knowledge

2242 Posts

Posted - 03/25/2013 :  09:46:54  Show Profile  Reply with Quote
Check this link
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 03/25/2013 :  09:48:04  Show Profile  Reply with Quote
For xlsx you should be using ACE provider

SQL Server MVP

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000