Subject Re: Generating CSV file
From Mustansir A Ghor <>
Date Mon, 10 Jun 2024 06:15:18 -0400
Newsgroups dbase.getting-started

Dear Mervyn Sir

Thank you. Asante


Mervyn Bick Wrote:

> On 2024/06/10 10:37, Mustansir A Ghor wrote:
> > Dear ALL
> >
> > I wish to generate a csv using following command. It does generate a text file but with tab seperated and not comma seperated.
> >
> > use tablename
> > list off to file ghor.txt
> >
> > Can we do some setting for it to be csv?
> >
> > Regards
> > Mustansir
> The text file the code create is not a Tab separated file, it is
> actually in SDF (System Data Format) format i.e fixed length records
> with field values padded with spaces to the width of the field in the
> .dbf file.
> To create a .csv file from a .dbf file
> use tablename
> copy to ghor.csv delimited
> use
> See COPY in the help file.
> This method of creating a .csv file does, however, have severe
> limitations.  It does not include data from memofields and dates are
> only saved as ,yyyymmdd, i.e no delimiters and no separators between
> year, month and day.  This is fine if you are going to use dBASE to read
> the .csv file but it is possible that other programs will see dates as
> characters rather than as dates.
> Although the delimiter that wraps character fields can be changed there
> is no provision for changing the field separator so one can't create a
> Tab separated file.
> If the program that reads the .csv file has a problem dealing with the
> date format or if you need to include data from a memofield in the .csv
> file have a look at usvout.prg in the dUFLP.
> Mervyn.