Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Data into Comma-Delimited
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00067459
Message ID:
00067461
Vues:
45
After you have built the lcStr string:

lcStr = lcStr + chr(13) + chr(10)

This will add a carriage return + line feed (CR + LF) at the end of the first row. In very rare cases, some application don't accept CR+LF, but only one of them. As said, very rare. So, if it doesn't work, try with only one of these chars.

Vlad

>Paul,
>
>Thanks for the info on AFIELDS() function. I'm using it in the code below. But I'm having a problem with the APPEND MEMO command.
>
>The code below gets my field names correctly delimited and in quotes.  But the APPEND MEMO command adds the records from the cursor right to the end of my first
>"header row" line.  How do I force it to start appending on the second line.  Do I force some sort of carriage return?  If so, how?
>
>Thanks.
>Elgin
>
>COPY TO ALIAS()+".txt" TYPE DELIMITED
>lcFile = alias() + ".txt"
>n=AFIELDS(laFields)
>  lcStr = '"'+laFields[1]+'"'
>for i = 2 to n
>lcStr = lcStr + "," +'"'+ laFields(i,1)+'"'
>endfor
>create cursor temp (mStr m)
>append blank
>replace temp.mStr with lcStr
>append memo mStr from (lcFile)
>copy memo temp.mStr to (lcFile)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform