Solved

Export to Excel from 64 bit SQL Server 2008

Posted on 2011-09-21
3
587 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

785 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