The beauty of foxpro is that you almost never have to use it. look up fcreate() fwrite() and fclose() in the help. It's fairly easy.
you have to create the output file, write to the output file, then close the output file. Remember to put in a comma "," between fields and quotes around the fields " ". This program isn't tested, but you get the idea. memfcreate = '\directory\filename.csv' && name of output file mikeopen=FCREATE(memfcreate) && opens file for writing string1 = '"'+trim(field1)+'"' +',' string2 = '"'+trim(field2)+'"' +',' stringx = '"'+trim(fieldx)+'"' mikef=fwrite(mikeopen, string1+string2+stringx) && writes to file with carriage return and line feed at end mikef=fclose(mikeopen) && closes file --- On Wed, 11/26/08, Sytze de Boer <[EMAIL PROTECTED]> wrote: > From: Sytze de Boer <[EMAIL PROTECTED]> > Subject: Re: VFP9 - CSV files > To: [email protected] > Date: Wednesday, November 26, 2008, 4:37 PM > HI Jeff, thanks for your help > I have never in 20 years of foxpro even looked at Fopen, > Fwrite etc > > Can you spare 30 secs and share how to use FPUTS ? > > > On Thu, Nov 27, 2008 at 10:25 AM, Jeff Johnson > <[EMAIL PROTECTED]> wrote: > > I do this often by creating a string for each line and > then outputting > > using FPUTS() low-level file operation. I usually use > the COPY TO > > myfile.csv TYPE CSV but I use the low-level method > when I have a memo field. > > > > HTH > > > > Jeff > > > > Jeff Johnson > > [EMAIL PROTECTED] > > SanDC, Inc. > > 623-582-0323 > > Fax 623-869-0675 > > > > Phoenix Python User Group - > [EMAIL PROTECTED] > > > > Sytze de Boer wrote: > >> Can someone help me out please > >> > >> My client requires me to produce a file with car > details for their > >> website developers > >> The website developers asked me to transfer the > information to them per csv file > >> > >> One of the columns is a MEMO field which I > translate into a string so > >> it becomes a column in the csv file. > >> I truncate the string to 255 chars because excel > is limited to column > >> widths of 255 chars > >> (and the remainder becomes another column) > >> > >> The web people tell me that since a csv file is a > text file, this > >> splitting process is not required. > >> How can I make a csv file where the memofield is > not split ? > >> > >> -- > >> Regards > >> Sytze de Boer > >> Kiss Systems > >> Hamilton, NZ > >> Ph: 64-7-8391670, Mob:021 937611, > >> www.kiss.co.nz > >> > > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

