Anda di halaman 1dari 6

24/03/2011

Import Data from Excel 2007 to SQL Se

SQL Server | SharePoint | CareerQandA

Subsc ribe:

join the c ommunity

Ho me

Tips

Co mmunit y

T o o ls

T ut orials

W ebcas ts

W hit epapers

Search

Ques t io ns

Get Our Tips Newsletter

Import Data from Excel 2007 to SQL Server

enter email address

Join

By: Tim Cullen -- 5/11/2010


Rating: (not rated) | Comments (4) | Print |

Share

Win a Color Nook with SQL Server eBooks


Problem
Our c ompany recently pushed out Offic e 2007 to all workstations. I'm trying to import an Exc el 2007 spreadsheet into
SQL Server using the Import/Export Wizard but just c an't make it work. I don't even see the driver for Exc el. Do you all
have any advice? Chec k out this tip for the solution.
Solution
As you've likely notic ed some things have c hanged with the Import/Export Wizard, and even more so with the available
drivers. In previous versions of Excel, a driver specific to Exc el was available. With Exc el 2007 you use the Microsoft
Acc ess 12.0 Database Engine OLE DB Provider:

R ed Ga te So ftwa re - SQ L Backup
Nee d to crea te s m aller, m o re re liable ba ck ups ?
Ens ure yo ur backups a re o ptim ize d fo r
robus tnes s and spee d with R ed Gate SQ L
Backup Pro. C om pre ss your ba ck ups by up to
95% and m inim ize dis ruptions to yo ur backups
cause d by flak y ne tworks with new ne two rk
res ilie nce . "Ne twork res ilience puts SQ L Ba ck up
P ro 6 a t the to p of the lis t of ba ck up too ls . I ts
the che rry o n to p, and I de finitely recom m e nd
using SQL Backup ove r SQ L Se rve r 2008 native
backups." W illia m Durk in, De ve lo pm e nt DBA.
Downloa d now.
Downloa d now!

One thing you will notic e is that the driver is not available with the 64-bit Import/Export Wizard. To ac c ess the driver
on a 64-bit system c hoose "Import and Export Data (32-bit), loc ated in the SQL Server 2008 folder:

Using the Microsoft Access 12.0 Database Engine OLE DB Provider in


Import/Export Wizard
To import Exc el 2007 spreadsheets into SQL Server perform the following steps:

www.mssqltips.com/tip.asp?tip=2002

1/6

24/03/2011

Import Data from Excel 2007 to SQL Se


To import Exc el 2007 spreadsheets into SQL Server perform the following steps:
Start the 32-bit Import and Export Data (32-bit) program, c hoose the Microsoft Acc ess
12.0 Database Engine OLE DB Provider, and c lic k Properties:

SQL Server Tips


Latest
Active Comments
Related

Latest
Identify deprec ated SQL Server code with a
server-side trac e
Building a Sc ale-Out SQL Server 2008 R2
Reporting Servic es Farm using Windows
Network Load Balancing Part 1
Using the Emergenc y State for a Corrupt
SQL Server Database
Read and Write Text Files in SQL Server with
CLR
Interesting example of statistic s and index
use on computed column in SQL Server
Understanding SQL Server's inserted and
deleted tables for DML triggers
Resolving c ould not open a c onnec tion to
SQL Server errors
Controlling dataset proc essing time in SSRS
reports
Monitor, Diagnose, Administer and Automate
Tuning for SQL Server
How to Identify I/O Bottlenec ks in MS SQL
Server

Active Comments
SQL Server random numeric s data generation
using CLR (21)
Using the Emergenc y State for a Corrupt
SQL Server Database (7)
Read and Write Text Files in SQL Server with
CLR (2)
How to strip out double quotes from an
import file in SQL Server Integration Services
SSIS (4)
Select the All tab and double-c lic k Data Sourc e:

SQL Server DDL Triggers to Trac k All


Database Changes (4)
Interesting example of statistic s and index
use on computed column in SQL Server (1)
Analyzing SQL Agent Job and Job Step
History in SQL Server (6)
Resolving c ould not open a c onnec tion to
SQL Server errors (2)
Pro SQL Server 2008 Polic y-Based
Management (1)
How to determine which version of SQL
Server data ac c ess driver is used by an
applic ation (2)

Related
Using a SQL Server Linked Server to Query
Exc el Files
Import Data from Excel 2007 to SQL Server
Insert, Update or Delete Data in SQL Server
from an Excel Spreadsheet
SQL Server Reporting with Microsoft Exc el
Insert data from Exc el to SQL Server 2005
by using copy and paste commands

www.mssqltips.com/tip.asp?tip=2002

2/6

24/03/2011

Import Data from Excel 2007 to SQL Se


Enter the file loc ation and name and c lic k OK:

Export data from SQL Server to Excel

Community Questions
Latest
Active
Most Ac tive

Latest
Match NULL = NULL
sqlserver2008
error restoring database mirroring
Query Requirement
Problem in Getting the DateTime Variable
from the Database
Restore
How to removing parameters from SSIS
Double-click Extended Properties, enter Excel 12.0, and c lic k OK:

Connec tion Manager


reinitialization of Errorlog in sqlserver
Upgrade from SQL Server 2000 with Linked
servers and Replic ation jobs
dbo tables c hanged to db_owner after
upgrade sc ript

Active
Match NULL = NULL (1)
sqlserver2008 (1)
How to Attac h a Database of SqlServer
Using Visual Studio Server Explorer. (1)
dbo tables c hanged to db_owner after
upgrade sc ript (2)
Errorlog (2)
error restoring database mirroring (1)
Query Requirement (3)
Compare two databases in sql server 2005
(2)
Bloc ked Column is showing -2 in
master..sysproc esses (2)
Problem in Getting the DateTime Variable
from the Database (2)

Most Active
sql 2008 r2 pagefile size usage high
Restricting Windows administrators from
Ac c essing SQL Server 2008
Disabled triggers are enabled automatic ally
while upgrade of database going on.
How to c onvert the TimeStamp of MS-SQL
into Datetime

www.mssqltips.com/tip.asp?tip=2002

3/6

24/03/2011

Import Data from Excel 2007 to SQL Se


into Datetime
Regarding the sql server logins
Learning SSIS and SSAS
ROUND() function
modify name of linked server in all objec ts of
Sql Server
Restoring 3rd party db
How to get individual columns from backup
set

Click OK twic e and proceed through the wizard. Once on the sc reen used to map the
source and destination you have the option to Preview the data:

Announcements
Events
Giveaways
Contribute

Events
Free Live Webcast
SQL Server, Storage and You (Apr 13th)

Giveaways
Giveaways
Win a Color Nook with SQL Server eBooks
MSSQLTips is giving away a Color Nook
Reading Device with SQL Server eBooks.
The winner will be selec ted on April 6, 2011.

Contribute
Contribute and make some money!
Bec ome a MSSQLTips author
Share your knowledge about SQL server with
the MSSQLTips c ommunity. Just about every
day you probably learn something new, so
share that knowledge.

Using the Microsoft Access 12.0 Database Engine OLE DB Provider in SSIS
When setting up an OLE DB c onnec tion for an SSIS package right the Connection
Manager, c hoose New OLE DB Connection, then c hoose Microsoft Acc ess 12.0 Database
Engine OLE DB Provider:

www.mssqltips.com/tip.asp?tip=2002

4/6

24/03/2011

Import Data from Excel 2007 to SQL Se

Enter Exc el 12.0 in the Extended Properties sec tion and the file loc ation and name in the
Data Sourc e sec tion:

There are a few things to consider when using this driver. First, the driver will work for both Excel 2003 and 2007
spreadsheets so if you are setting up an SSIS pac kage to import data you don't need to switch drivers for each file
type. Second, if you plan on having the SQL Server Agent execute SSIS pac kage then you will likely need to install the
Offic e 2007 System Driver: Data Connectivity components. These c omponents are available on the Mic rosoft Download
Center website.
Next Steps
Onc e complete you c an preview the data by adding a Data Flow Task, adding the OLE DB
Work withConnection
the Import/Export
Wizard
to get
to the OLE
DB sourc
e. a feel for how to c onfigure the driver for import of data housed in an
Excel 2007 spreadsheet
Download the 2007 Offic e System Driver: Data Connec tivity Components
Chec k out these related tips
SQL Server Integration Servic es
SQL Server Agent
Export data from SQL Server to Excel
Inserting, Updating or Deleting Data in SQL Server from an Excel Spreadsheet

www.mssqltips.com/tip.asp?tip=2002

5/6

24/03/2011

Import Data from Excel 2007 to SQL Se


Inserting, Updating or Deleting Data in SQL Server from an Excel Spreadsheet
Microsoft Ac cess and SQL Server Integration
SQL Server Reporting with Microsoft Exc el

Sponsor Information
Try the free performance monitoring tool from Idera!
Write, edit, and explore SQL effortlessly with SQL Prompt
SQL Server Issues? Not sure where to turn for answers? Innovative SQL DBA c onsultants
Prepare for your next SQL Server interview with CareerQandA.com
Free SQL Server web c asts for DBAs and Developers on Performance Tuning, Development, Administration, Disaster
Rec overy, Replic ation and more....

Copyright (c ) 2006-2011 Edgewood Solutions, LLC All rights reserved


privacy | disclaimer | c opyright | advertise | c ontribute | feedbac k | about
So m e na m es a nd pro ducts lis ted a re the re gistered tradem a rk s of their res pe ctive o wne rs .

CareerQandA.com | MSSharePointTips.com | MSSQLTips.com

www.mssqltips.com/tip.asp?tip=2002

6/6