This content has been marked as final. Show 5 replies
<cfset x = GetTabTextFeed(list)>
Thanks for the quick reply. It worked perfectly.
Another question - now that I see the results. I have an empty record for some of my data points. This script looks like it should set them to null, but in fact it just skips right over it leaving my array with a dimension of 11 instead of 12. Any ideas why? Is it with my file?
This is because that UDF uses list functions and list functions do not recognize empty items!!! (No one can provide a GOOD reason why Allaire did that.)
To fix this, rewrite the UDF without list functions or, perhaps this is good enough? :
<cfset explictNulls = REReplace (list, "([\t])\t", "\1[blank]\1", "ALL")>
<cfset x = GetTabTextFeed (explictNulls )>
Also, it looks like that UDF might not handle carriage returns (Chr (13)) well.
Thanks for the quick response. This seems to work for all but the first data element. Does this have something to do with the carriage return?
No, the kludge I supplied does not work if the first or last element is blank.
Instead use the new UDF I've attached.
It handles empty values no matter where they are and is 10 to 40% faster.
Finally, your database also handles tab-separated file import. For large files, it is the smart choice.