Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing CR * LF from CSV file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01440894
Message ID:
01440978
Vues:
56
This message has been marked as a message which has helped to the initial question of the thread.
>I'm studying the message thread you sent me - thanks
>
>By the way
>
>lcFileStr = filetostr('&wwx')
>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')
>
>Is fine as my csv file only ever contains a single record - but there's the problem - how do I get rid of the column headers - I have no control over the way the csv file is written?
>
>Colin
>

You may first remove the first line with Headers, e.g.

lcFileStr = substring(m.lcFileStr, at(CRLF, m.lcFileStr) + 2) && and then apply chrtran.

Also, you don't need to use macro in your code above, I think.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform