Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing CR * LF from CSV file
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01440894
Message ID:
01440897
Views:
81
>Hi
>
>I'm triyng to append a csv file as type delimited into a VFP table - the csv file has carriage return and line feed characters which need removing prior to the append
>
>How can i do this?
>
>Thanks
>
>Colin

Why do you need to remove them?


Try using filetostr/strtofile functions and then CHRTRAN or STRTRAN functions.
lcFileStr = filetostr('myFile.txt')
lcFileStr = chrtran(m.lcFileStr, chr(13) + chr(10),'') && to remove all of them at once - the file will be one long line now

strtofile(m.lcFileStr,'myFile1.txt')

append from myFile1.txt
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform