Subject Re: importing csv file
From Mustansir Ghor <mustan31@hotmail.com>
Date Fri, 04 Jun 2021 12:05:35 -0400
Newsgroups dbase.getting-started

Dear Mervyn Sir

Thank you.

With addition of DELIMITED word  in the append command all worked well.

Best Regards
Mustansir

Mervyn Bick Wrote:

> On 2021/06/02 21:56, Mustansir Ghor wrote:
> > Dear All
> >
> > Is there a way to import csv file into dbf table
> >
> > Best Regards to all
> >
> > Mustansir
> >
>
> Importdata.wfm in the dUFLP will do this.  The form is, however, more
> suited to once-off operations as it requires quite a bit of user input.
>   Where .csv files with the same layouts need to be imported into a
> table regularly I find it easier to create a separate program to do the
> work.
>
> If you look in the program I posted for you yesterday (nhif2.prg) you
> will see that it did exactly that.  The .csv file Excel made on my
> computer used a semicolon as the separator.  You would need to change
> the ; to a comma in the breakstring parameter to deal with a comma
> separated file.
>
> That code will work with most .csv files.  If, however, you have to
> import dates you may need to add code to format the date before it gets
> saved to the .dbf file.
>
> Mervyn.
>
>
>