Sep 10

Thanks to “jaegd” for his post here: http://forums.microsoft.com/… on how to accomplish this. Below please find some more details along w/ a example which can be downloaded here (ssis-2005-excel-2007-source-example).

Steps

  1. Create new OLEDB Connection by right clicking on the Connection Manager tray
  2.  

    New OLEDB Connection in SSIS

    New OLEDB Connection in SSIS

     

  3. Chose any valid type or value for the connection and click okay
  4.  

    OLEDB Connection Manager

    OLEDB Connection Manager

     

  5. Rename the Connection Manager to something that makes sense, like “Excel 2007″
  6. Now that the the connection exists right click on it and select properties
  7. Edit the Connection String property IN THE PROPERTIES WINDOW to match below, updating with your Excel File Location
    • Data Source=C:\MyExcelFile.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=”Excel 12.0;HDR=YES;”
  8.  

     

    manually-edit-connection-string

    manually-edit-connection-string

You can now use this connection by referencing it with any task/object that would normally connect to an OLEDB source. To query it use [Sheet1$] for the table name (eg. SELECT * FROM [Sheet1$])

Do you have anything to add? Please add your comments below!

Cheers,
Ben

9 Responses to “Using Excel 2007 files as a Source in SSIS 2005”

  1. James Wiseman Says:

    Really useful article, thanks.

    One minor issue in that when I used the connection string you provided above, I got the following message:

    “Could not find installable ISAM”

    At the end of your conenction string, you have =YES”; when it shoudl be =YES;”

    I.e. the quote and semi-colon are the wrong way around!

    Otherwise, terrific. Thanks.

  2. bsullins Says:

    Updated…Thanks James!

  3. Chantal Says:

    Great article, really helped us! Did change as per the comment from James and it works. Thanks

  4. A Says:

    Great info! Thanks for posting it!

  5. Prasanta Says:

    Thanks for the info..Could you please let me know how can I use Excel 2007 files as a Target in SSIS 2005?

  6. bsullins Says:

    Hi Prasanta,

    I haven’t tried it but I would recommend trying to do the reverse of creating the file connection as a source. The default destination for XLS should also work for Excel 2007 users, it may just not be in the new format. Not sure what your requirements are however…

    Let me know how it goes and if you run into any specific issues you might need help with.

    Cheers,
    Ben

  7. elixic Says:

    This does not work for me. When I enter the correct connection string I get the error message; “The connection string format is not valid. It must consist of one or more components of the form X=Y, separated by semicolons. This error occurs when a connection string with zero components is set on database connection manager.” If I enter the original connect string I get the ISAM Error.

    Here is my invalid connection string;
    Data Source=C:\myfile\ProjectsLookups.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=”Excel 12.0;HDR=YES;”

    If I change it to HDR=YES”; It is ‘valid’ but then I get the ISAM Error.

    Anyone have any Ideas? Thanks!

  8. bsullins Says:

    Try moving the last double quote to separate the last two elements:

    Data Source=C:\myfile\ProjectsLookups.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=”Excel 12.0″;HDR=YES;

  9. Dan Ling Says:

    I’m trying to use SSIS to get data from an Excel 2007 document into SQL server 2005 (SP3) and the connection manager won’t let me point to the Excel file in SharePoint (various test connection errors). This is a x64 bit environment running in x32 bit mode.

    Import works when the Excel doc is a file. I’m using the UNC path without the “%20″ in the string.

Leave a Reply