Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delimited text output without quotes?
Message
De
17/11/1999 18:52:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00292190
Message ID:
00292197
Vues:
21
Well, this may be obvious but...

I don't have a quick solution for you, but have you though about using the fopen() and subsequent fputs()? The whole routine wouldn't be very long and you can specify whatever delimter you want that way.

Chan = fopen("OUTFILE.CSV",1)
if Chan < 1
*error handling
return
endif
use [filename] in 0
set order to [whatever]
go top
do while ! eof()
scatter memvar
RetVar = fputs(CHAN,m.FIELD1+","+ [....all fields] )
*check for write error using RetVar
skip
enddo
RetVar = fclose(Chan)
*test for good close here
use

The above code is untested of course :) If you have *many* fields, you might want to put them into an array and use a for-loop with fwrite()'s instead of one long fputs(). If you do this, remember the CR-LF at each line end.

Hope it helps.

-Arne
arne@synercom-edi.com "There are no absolutes but this one."
President, synercom/edi - Event Ticketing Solutions
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform