Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Development
 How to: Connect to an Excel Workboo...

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
SQL Server 2008 Books Online (June 2009)
How to: Connect to an Excel Workbook

Updated: 26 February 2009

To connect an Integration Services package to a Microsoft Office Excel workbook requires a connection manager and a data provider. The connection manager and data provider that you use depend on the version of the Excel file format:

  • For files that have an Excel 2003 or earlier format, the package requires an Excel connection manager, which, by default, uses the Microsoft Jet OLE DB Provider. For more information, see Excel Connection Manager.
  • For files that have the Excel 2007 format, the package requires an OLE DB connection manager and the OLE DB provider for the Microsoft Office 12.0 Access Database Engine. For more information, see OLE DB Connection Manager.

You can create these connection managers and select the corresponding data provider from either the Connection Managers area in SSIS Designer or from the SQL Server Import and Export Wizard.

Cc280527.note(en-us,SQL.100).gifNote:
On a 64-bit computer, you must run packages that connect to Microsoft Excel data sources in 32-bit mode. Both the Microsoft Jet OLE DB Provider and the OLE DB provider for the Microsoft Office 12.0 Access Database Engine are only available in 32-bit versions.

  1. In Business Intelligence Development Studio, open the package.

  2. In the Connections Managers area, right-click anywhere in the area, and then select New Connection.

  3. In the Add SSIS Connection Manager dialog box, select Excel, and then configure the connection manager.

    For information about the configuration options that are available for this connection manager, see Excel Connection Manager Editor.

  1. Start the 32-bit version of the SQL Server Import and Export Wizard.

  2. On the Choose a Data Source page, for Data Source, select Microsoft Excel, and then configure the Excel connection.

    For information about the configuration options that are available for this connection type, see Excel Connection Manager Editor.

To access an Excel 2007 workbook, the OLE DB connection manager requires the OLE DB provider for the Microsoft Office 12.0 Access Database Engine. This provider is installed automatically with the 2007 Microsoft Office system. If the 2007 Office system is not installed on the computer on which Integration Services is running, you have to install the provider separately. To install the OLE DB provider for the Microsoft Office 12.0 Access Database Engine, download and install the components on this Web page, 2007 Office System Driver: Data Connectivity Components.

For more information on the file formats that Excel 2007 supports, see File formats that are supported in Excel.

  1. In Business Intelligence Development Studio, open the package.

  2. In the Connections Managers area, right-click anywhere in the area, and then select New OLE DB Connection.

  3. In the Configure OLE DB Connection Manager dialog box, click New.

  4. In the Connection Manager dialog box, for Provider, select Microsoft Office 12.0 Access Database Engine OLE DB.

    Cc280527.note(en-us,SQL.100).gifNote:
    To connect to a data source that uses Excel 2007, you cannot select Microsoft Jet 4.0 OLE DB Provider for the Data Source.

  5. On the Connection tab of the Connection Manager dialog box, for Server or file name, type or paste the complete path and file name.

  6. On the All tab of the Connection Manager dialog box, for Extended Properties, enter one of the following values based on the file format of the Excel 2007 file:

    • Enter Excel 12.0 Xml for the default file format that uses the .xslx file name extension.
      —or—
    • Enter Excel 12.0 for the non-default binary file format that uses the .xslb file name extension.
    Cc280527.note(en-us,SQL.100).gifNote:
    When you import from Excel 2007, you can specify either Excel 12.0 or Excel 12.0 Xml because the driver infers the correct format from the input file. However, when you export to Excel 2007, you have to specify the Excel file format that corresponds to the file name extension that you have given the output file.

  1. Start the 32-bit version of the SQL Server Import and Export Wizard.

  2. On the Choose a Data Source page, for Data Source, for Data Source, select Microsoft Office 12.0 Access Database Engine OLE DB Provider.

    Cc280527.note(en-us,SQL.100).gifNote:
    To connect to a data source that uses Excel 2007, you cannot select Microsoft Jet 4.0 OLE DB Provider for the Data Source.

  3. Click Properties.

  4. On the Connection tab of the Data Link Properties dialog box, for Data Source, type or paste the complete path and file name.

  5. On the All tab of the Data Link Properties dialog box, for Extended Properties, enter one of the following values based on the file format of the Excel 2007 file:

    • Enter Excel 12.0 Xml for the default file format that uses the .xslx file name extension.
      —or—
    • Enter Excel 12.0 for the non-default binary file format that uses the .xslb file name extension.
    Cc280527.note(en-us,SQL.100).gifNote:
    When you import from Excel 2007, you can specify either Excel 12.0 or Excel 12.0 Xml because the driver infers the correct format from the input file. However, when you export to Excel 2007, you have to specify the Excel file format that corresponds to the file name extension that you have given the output file.

Tags What's this?: dao (x) Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker