Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying to a Delimited File - Getting Rid of Quote Marks
Message
De
26/05/1999 04:15:12
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00222810
Message ID:
00222812
Vues:
21
>I am trying to copy a dbf to the equivalent of a .csv file (comma separated). If I use the VFP command:
>
>COPY TO file DELIMITED WITH CHAR ,
>
>It will separate the field with commas but it also puts quotation marks around the character fields (apparently because commas may be in the text). I don't want to send that. I want strict comma delimited.
>
>Any suggestions???
>
>Thanks always everyone for the advice.
copy to file temp.txt delimited
handlein=fopen("temp.txt")
handleout = fcreate("mytext.txt")
#define MAXSIZE 65535
* Could be whole filelength but 65535 prevents rare headaches
do while !feof(handlein)
 =fwrite( handleout, ;
   chrtran( fread( handlein, MAXSIZE),["],"", MAXSIZE )
enddo
=fclose(handlein)
=fclose(handleout)
erase temp.txt
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform