Follow

Excel is reporting wrong data types

Symptoms

When using Excel as a data source, you can experience problems with data types. Typically you will see that a text field is detected as a decimal field, but other mistakes can also occur.

Cause

By default, Excel uses the first eight rows of data to determine the data type. So if the first eight rows of data for a particular field is numeric, then the data type will be declared as numeric. If the ninth row of data contains alphanumerical characters then it will cause an error or simply be assigned no value (Null) in the staging table.

Resolution

You can change the behaviour for detecting the data types by changing a registry parameter called "TypeGuessRows".

  1. Click Start -> Run -> type "regedit" -> press Enter
  2. Press F3 to bring up the search dialogue and enter "TypeGuessRows".
  3. When found, right click on the value TypeGuessRows and choose Modify...
  4. Enter a value higher than eight to increase the number of rows Excel uses to determine the data type or zero to make Excel read all rows to determine the data type.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.