hi,
thank you for reply, and help
i try to use FIELD() AND FCOUNT() as under ,in this case i have no idea how i can make alter table for all fileds.
thisform.text1.Value=GETFILE('xls')
IMPORT FROM (thisform.text1.value) TYPE XLS
use JUSTSTEM(thisform.text1.value)
m.t=JUSTSTEM(thisform.text1.value)
CLEAR
FOR gnCount = 1 TO FCOUNT( )
? FIELD(gnCount)
NEXT
?
? 'Number of fields: ' + ALLTRIM(STR(gnCount -1))
USE (m.t)
? FCOUNT(m.t)
alter table(m.t)(A with first column data,B with..... )
thanks.
>You can use FIELD() AND FCOUNT() to loop through the fields and ALTER TABLE to rename fileds.
>
>>
>>is there away to change fields name a,b,c,d....
>>
>>with first records data after import command
>>
>>
>>fileds name a b c d ......
>>rec.1 num name sala .......
>>
>>
>>
>>thisform.text2.Value=GETFILE('xls')
>>IMPORT FROM (thisform.text2.value) TYPE XLS
>>
>>use JUSTSTEM(thisform.text2.value)
>>
>>replace filed A with (first culomn data)
>>replace filed b with (second culomn data)
>>replace filed c with (therd culomn data)
>>replace filed d with (...................)
>>.
>>.
>>.
>>
>>
>>thanks