Sunday, February 19, 2012

excel source numeric/string data problem

i've been reading some problems with excel source data being force as

numeric type when there are string/numeric type in the data, but adding

IMEX=1 to the extended properties will fix this problem...this is true

but not in my case...

say my excel file have about 40 rows..if row 1-39 in column A are all

NULL and row 40 has a string in it, the string in row 40 will not be

converted and the excel source is forcing this column A data type to be

numeric..having IMEX=1 in there does not work..however..if i add a

string anywhere in row 1-8 in column A, the the string in row 40 will

be converted because the external data type now is a string..

anyone know how to solve this problem?solved this problem by going into the excel file and format first first 8 rows as text|||

An alternative is to change the datatype for the column using the "Show Advanced Editor" menu on the Excel Data Source. Select the "Input and Output Properties" tab, expand the Excel Source Output and the the "Output Columns" (Note: not the External Columns). Now you can select change the DataType property of some \ all columns.

No comments:

Post a Comment