Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying to a Delimited File - Getting Rid of Quote Marks
Message
From
26/05/1999 04:15:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00222810
Message ID:
00222812
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform