Solved

Export to Excel from 64 bit SQL Server 2008

Posted on 2011-09-21
3
580 Views
Last Modified: 2013-11-25
I want to export from SQL server to an Excel Spreadsheet.  I tried
insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
    'Excel 8.0;Database=D:\testing.xls;',
    'SELECT * FROM [SheetName$]') select * from table
But I got error 'The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered.'
This seems to be a common problem with 64 bit SQL server and there is a lot of confusing information available on the web, so can anyone who has done this tell me how to export to excel from 64 bit SQL server 2008.  I am working on a SMall Business Server 2008.
Does Excel have to be installed on the server to aloow exporting to excel?
0
Comment
Question by:DCMBS
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
JestersGrind earned 500 total points
ID: 36574018
Excel doesn't have to be installed, but the correct 64 bit provider does.

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13255

Your query is going to change slightly too.

insert into OPENROWSET('Microsoft.ACE.OLEDB.12.0',
    'Excel 14.0;Database=D:\testing.xls;',
    'SELECT * FROM [SheetName$]') select * from table

Greg

0
 
LVL 9

Author Comment

by:DCMBS
ID: 36579034
I have downloaded the provider and tried to install it but it won't install as 32bit office is already installed on this machine.  I have uninstalled the 32 bit office but now I have to reboot the server before the 64bit provider will install.  This will probably be overnight as this server is in constant use.
0
 
LVL 9

Author Closing Comment

by:DCMBS
ID: 37169589
Apologies for delay but this project got put on the back burner and I have been unable to fully test this solution. As far as I can tell it does what I wanted it to do.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now