Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Importing from a line delimited text file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00094304
Message ID:
00095281
Views:
36
>>>And once I DID get a file delimited with "|". Nasty to handle.
>>>
>>
>>I see it all the time, actually. DHL sends out their rate and route files using the bar delimiter, and it's a PITA the first time you encounter it. The solution we settled on was to use low-level file I/O to read the file a line at a time, and then parse the line into a vector using AT() to isolate token values. Once written, the solution works regardless of what the delimiting character is.
>
>Great minds... that's almost exactly what I ended up doing.

The 'import' functions are really speedy in fox,
so i parse the file to replace the unwanted delimiters with
more usable ones.
And, after that, i run the import as text delimited.

Very fast...

:0)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform