you're reading...
SQL Server

SSIS to Excel 2007 Export Issues

Ever tried to export to Excel 2007 from SSIS and experienced issues with the output file then this blog entry may help. The default Microsoft Excel 2007 file fomat, with the file extension .xslx (a Zip file that contains multiple XML files). However Excel can also be saved to a binary format, with the file extension .xlsbExcel supported file formats.

The SQL Server Books Online topic, How to: Connect to an Excel Workbook, contains incomplete but potentially misleading information when instructing one to set Extended Properties = "Excel 12.0" on the OLE DB Connection Manager.

  • Importing. The driver doesn’t care which of the 2 values (listed below) you use for Extended Properties when you are importing from Excel 2007.  The driver infers the proper Excel file format from the existing input file.
  • Exporting. When you are exporting to Excel 2007, however, Extended Properties = "Excel 12.0" creates an Excel binary file. This would normally not be an issue however if you gave your file the standard l .xslx file extension, the Excel application later complains that the file format is incorrect (because it’s really .xlsb) and refuses to open the file.

To correct this simply use the property settings outlined below:

  • Default file extension of .xslx (Excel XML format), and Extended Properties = "Excel 12.0 Xml"
  • Non-default file extension of .xslb (Excel binary format), and Extended Properties = "Excel 12.0"

About ldgaller

Accomplished Data Warehouse Architect, DBA and Software Architect with over 15 years of professional experience and demonstrated success designing and implementing solutions that improve business functionality and productivity. Highly diverse technical background with proven ability to design, develop and implement technology on an enterprise level. I approach all projects with passion, diligence, integrity, and exceptional aptitude.


No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: