Thursday, September 8, 2011

TypeGuessRows for excel! SSIS Excel import NULLS !

I have an Excel file that I want to import into SQL Server.

The package works fine! Except it nulls out some columns. and since these columns are null, it's picking null for the rows.

interesting, you could change the number of rows that's being used for guessing by the jet engine...

I never had this problem before, so I'm learning now!!

Learned that a TypeGuessRows in registry which is 8 by default, and this is number of rows which Jet engine try to fetch "data type" can be changed up to 16.

At the following location.

Another property named IMEX which is for Mixed types in excel. actually when Jet engine mark any column as mixed type ( like columns which character and numeric together ), then IMEX=1 excel will always fetch data as text.

so use IMEX=1 and set TypeGuessRows as number of rows which is appropriate.

Related MS KB:

Hope that helps someone as it helped me.