sudeep sharma wrote in message
>can anybody tell me how to create csv file in xbase application.
If you want to create a CSV from a DBF file, use the function DbExport() and
set <cDbeName> parameter to "DELDBE". You can set the field delimiters and
others with the parameter <aDbeInfo>.
See further details about DELDBE in the documentation: "Database Engines ->
ASCII file (SDF/TXT) -> DELDBE"
Am 29.12.2017 um 19:16 schrieb sudeep sharma:
> can anybody tell me how to create csv file in xbase application.
> Sudeep Sharma
a very easy way is the same as with clipper:
set console off
set alternate to "myFile.csv"
set alternate on
do while ! eof()
if PrintRecord() your filter
? ... all your fieldnames ...
Depending what you need !!!
Excel in Germany needs 1,90 not 1.90
Excel use ";" instead of "," between fields
Strings should be in " ... "
Maybe you don't want to have
CRLF inside a variable ?
how to print date fields ...
so I would make a function to handle
the data fields as you need, like
default cVar to ""
cVar := '"'+cVar+'"' alltrim() ?
case valtype(cVar)="N" with or without dec ?
cVar := str(cVar) Translate() ?
cVar := StrTran(cVar,",",cDelim) "." => ","
cVar := dtos(cVar) or iso or ???