Subject Re: Automated DBF export to CSV
From Tom McDermott <mcdermt@amc.edu>
Date Fri, 22 Sep 2017 16:05:57 -0400
Newsgroups dbase.getting-started

Mervyn
The code you gave me provides a good CSV file -- thank you!!
Is there a way to automate this process into an EXE?
Any guidance is really appreciated.

Thank you for the help.

Mervyn Bick Wrote:

> On 2017-09-21 7:39 PM, Tom McDermott wrote:
> > Mervyn,
> > Thank you for this description of how to handle this request.
> > Based on your questions, I think the best approach for me would to keep this as simple as possible just to see if I can get something running every day that can be used.
> >
> > I would really like have the following:
> > -I will not append data; I want the full extract every day
> > -the date form yyyymmdd is acceptable in the .csv file
> > -pipe delimiter would be preferred if possible
> > -I am OK with the output file in the same folder as the input file
> > -I want the field names included as the first record
> > -I am not sure if the _dbaselock field is included; can we try this assuming it is not there?
> >
> > Thank you again.  I really appreciate all your time.
>
> Delimiter is the character used to wrap the contents of character
> fields.  The default is a double quote.
>
>    20170921,1.2,"this is text","and more text",23.6,450.99
>
> When you say a pipe delimiter do you mean you want something like the
> following?
>
>   20170921,1.2,|this is text|,|and more text|,23.6,450.99
>
>
> dBASe allows one to set the delimiter but it doesn't allow one to change
> the separator from a comma to something else.  It can be done but it
> needs to be done programmatically and then, of course, it isn't really a
> .csv (comma separated values) file. :-)
>
> The built in ability to create .csv files doesn't include the field
> names so this is going to have to be a program but try the following
> from the Command panel.  Type in the following with  enter after each line.
>
>    use whatever.dbf
>    copy to whatever.csv delimited with '|'
>    use
>    modi comm whatever.csv
>
>
> This will open the .csv flle in the sourcecode editor so that you can
> inspect it.  If everything you want is in the file except the field
> names the battle is virtually won.
>
> What is the name of the daily .dbf file?
>
> Mervyn.
>
>
>
> .
>
>
>
>