Solved

Export to Excel from 64 bit SQL Server 2008

Posted on 2011-09-21
3
598 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

696 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