FOR gnCount = 1 TO FCOUNT( ) OldName = FIELD(m.gnCount) NewName = ALLTRIM(EVALUATE(FIELD(m.gnCount))) ALTER TABLE (m.t) RENAME COLUMN (m.OldName) TO (m.NewName) NEXT>thank you for reply, and help
>thisform.text1.Value=GETFILE('xls') >IMPORT FROM (thisform.text1.value) TYPE XLS > >use JUSTSTEM(thisform.text1.value) >m.t=JUSTSTEM(thisform.text1.value) >*alter table (m.t)(a >CLEAR >FOR gnCount = 1 TO FCOUNT( ) && Loop for number of fields > ? FIELD(gnCount) && Display each field >NEXT >? >? 'Number of fields: ' + ALLTRIM(STR(gnCount -1))&&a,b,c,.....j >*CLEAR >USE (m.t) >? FCOUNT(m.t) &&result is 10 > >alter table(m.t)(A with first column data,B with..... ) >>