Thursday, December 01, 2005

What is IMEX=1? [Excel to SQL - SSIS]

While importing data from Excel to SQL Server using SSIS data is not coming through when we have mixed data type in Excel column. How to resolve this issue?
To resolve this issue, we can set an option IMEX=1 to the ConnectionString for Excel. This will force the column to be treated all as text.
Connection String Look Like:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\ExcelSheet.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1""""HDR=Yes;""IMEX=1;"

http://msdn2.microsoft.com/en-us/library/ms254500.aspx

No comments: