This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 07-13-201801:26 PM - edited on 03-11-201909:49 AM by SydneyF
When importing a .xls file using the Input tool, Alteryx produces NULL values for specific cells, why does this happen?
By design, Alteryx uses either the Jet or ACE drivers when importing .xls files. In short, it’s not really an Alteryx issue but rather a limitation on the Microsoft drivers, but there’s always a workaround available, and we’ll dig into it later.
One of the common reasons this happens is due to the logic both the JET and ACE drivers follow. By design, they look at the first eight rows in your document when identifying the data types and their lengths, when it comes to handling Legacy Excel files. Translation, please? If at least one cell within the first eight rows of your file contains more than 255 characters, then the drivers will set the data type as “memo” (i.e., a length that can hold up to 32,768 characters). Now if the data type doesn’t exceed 255 characters within the first eight rows the driver sets the data type as a string with a 255-character restriction. How does this relate back to you? Well, if any of your cell values that are after the first eight rows do surpass 255 characters, then the driver will assign a NULL value to those cells. Confusing, right? It’s a good thing all is not lost, at least not yet.
The user has the choice to work around this issue or fix it in their registry. The workaround includes the following:
From the Input Data Tool configuration, check option 6: "First row contains data." This will force all fields as a V_String.
Use the Auto Field Tool to assign the best field type for each data column correctly.
The fix for this involves changing a setting in your registry. These instructions are being provided as well as documented from Microsoft, as Alteryx cannot be sure that changing this setting will not cause problems with other applications. For more information on this issue: http://support.microsoft.com/kb/189897.
To change the Registry setting***
Go to Start > Run and type "regedit"
In the registry go to HKey Local Machine > Software > Microsoft > Jet > 4.0 > Engines > Excel
Double Click: TypeGuessRows
Change the value to 0 (zero)
Another workaround is to save the .xls file as a .xlsx. It’s well known that Microsoft hasn’t updated the legacy file extension since 1997. If this is an option you desire to exercise, fear not, there is a Macro for that, especially if you need to convert files by the masses.
Quick Shout out to DanJones for creating a fantastic app that takes a directory path and converts all xls files to csv or .xlsx respectively.
Disclaimer, when it comes to converting a .xls as .xlsx, please review if your workflow has a lot of formatting enabled, if so, please remember that sometimes this will potentially create inconsistencies with your data. It’s also possible to lose some data in the process.
*** For performance reasons, setting the TypeGuessRows value to zero (0) is not recommended if your Excel table is enormous. When the value is set to zero, Microsoft Excel will scan all records in your table to determine the type of data in each column.