Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Export text with field name
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00901618
Message ID:
00901809
Views:
13
Menachem,

I haven't seen your name connected with Fox since Flash and Codebook days. I'm so glad to see one of the oldtime stars back with the Fox.

Alex

>>Hi all,
>>
>>Does anybody now, how can I convert a dbf to text and have the field names in the first row.
>>
>>Thank you,
>>Ali
>
>You could do a standard LIST TO FILE kind of deal. Or you could roll your own. Something like this:
>
>
>*-- I will assume that we are using the current open table
>
>LPARAMETERS tcOutFile
>
>SET TEXTMERGE TO (tcOutFile)
>SET TEXTMERGE ON NOSHOW
>
>LOCAL lnCounter
>
>FOR lnCounter = 1 TO FCOUNT()
>	\\<<ALLTRIM(FIELD(lnCounter))>>
>	
>	IF lnCounter < FCOUNT()
>		\\,
>	ENDIF
>ENDFOR
>
>SCAN
>	FOR lnCounter = 1 TO FCOUNT()
>		\\<<TRANSFORM(EVALUATE(FIELD(lnCounter)))>>
>		
>		IF lnCounter < FCOUNT()
>			\\,
>		ENDIF
>	ENDFOR
>ENDSCAN
>
>SET TEXTMERGE OFF
>SET TEXTMERGE TO
>MODI COMM (tcOutFile) NOWAIT
>
>
>Hope this helps.
>
>Menachem
Previous
Reply
Map
View

Click here to load this message in the networking platform