jeudi 27 septembre 2007

SSIS Excel data source values returned as null

This problem occurs when we try to import an Excel file. All values of a column are returned in SSIS as null values but in the document we had values.
The problem is due to the provider : the provider calculate the data type of a column by analysing the first lines of the document.
The solution is to modify the ConnectionString property of the ExcelConnection component (add IMEX=1)
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\data\maroc\import.xls; Extended Properties="EXCEL 8.0;HDR=YES;IMEX=1;"
IMEX=1: indicates the provider to convert data, in multitype columns, to text values.

SEE :http://support.microsoft.com/kb/194124/en-us

Aucun commentaire: