Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: jdeline
Once you have the row in foo, you must deal with the empty list elements. You can accomplish that by finding consecutive tab characters and inserting a space between them.
Something like <CFSET foo = Replace(foo, "#Chr(9)##Chr(9)#", "#Chr(9)# #Chr(9)#", "ALL")>. You will want to do this twice to account for multiple empty list elements next to each other.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: LionelR
Thank you for the detailed answer and code however the code you provided is not working on the tab delimited file I have. I used your example line for line. First your specified loop delimiter "Chr(13)" does NOT parse the tabs, however when I replaced delimiters="#Chr(13)#" with delimiters "(six spaces)" in the cfloop, it worked. I don't know why.
Second, I get an error "The element at position 2 cannot be found." #variables.lineSet[2]# which tells us we're not identifying the end of line either. I've included a chunk of the actual file I'm trying to parse for your reference. Again, thank you.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: LionelR
Bob, Can you take a look at the actual file, (I've included a link to it in my previous message) and tell me if its even possible to parse this file. Thanks
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: LionelR
Sorry, try http://www.wireworks.net/cashout.zip
Copy link to clipboard
Copied
Copy link to clipboard
Copied