Blog Post

SQL Server Integration Services (SSIS) Blog
1 MIN READ

Exporting to Excel 2007 - .xlsx vs. .xlsb

SSIS-Team's avatar
SSIS-Team
Copper Contributor
Mar 25, 2019
First published on MSDN on Apr 05, 2010

http://dougbert.com/blogs/dougbert/archive/2009/02/13/exporting-data-from-ssis-to-excel-2007-gotchas.aspx , but it’s come up a couple of times in the last little while, so I thought I’d repeat it here.


The Excel 2007 default output format for the SSIS Excel Destination is Excel Binary Format (.xlsb). If you’re creating a new Excel file, and have given it an .xlsx extension, you’ll get the following error when trying to open it in Excel:



Excel cannot open the file ‘xxx.xlsx’ because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.


If you want the Excel Destination to output a standard .xlsx file (Excel XML Format), you’ll need to tweak your Excel Connection Manager’s connection string property.


By default it will look something like this:



Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\path\xxx.xlsb;Extended Properties=" Excel 12.0 ;HDR=YES";


Changing “Excel 12.0” to “Excel 12.0 Xml” will tell the provider to output in .xslx format instead.



Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\path\xxx.xlsx;Extended Properties=" Excel 12.0 XML ;HDR=YES"

Updated Mar 25, 2019
Version 2.0
No CommentsBe the first to comment