I don't have the time to give you any code, but if you have Excel installed, I would use automation. If Excel is not installed, you must do it in two steps. First read the data into a cursor, and then export the cursor into a txt file.
>thank you for reply,
>
>i try it i get error message
>Microsoft Excel file format is invalid , when i use vfp wizard i convert this excel sheet to txt file no proplem,
>
>when i use wizard to convert excel to dbf i get same error
>
>i get error for one column have names, if i remove this column it works ,
>
>but i need to do it via vfp code
>
>thanks
>
>>You can do this in a million different ways, one of the the easiest is this:
>>Import from yourexcelfile xls
>>_vfp.DataToClip(,,1)
>>StrToFile(_cliptext,'yourtextfile.txt')
>>If this is not how you want the txt file to look like, you must provide more info. Since a txt file is just a text file, there is no standard for this file.
>>
>>
>>>hi all,
>>>
>>>i need help to convert excel sheet to txt via vfp code
>>>
>>>thanks