*!*
列向转横向排列
Clear
Close Databases
Local nRow, nCol
Use Xsxx
nCol = 12
&& 假设有 12 列
nRow = Ceiling(Reccount() / nCol)
Dimension A1[nRow, nCol]
For nRow = 1 To Alen( A1, 1 )
For nCol = 1 To Alen( A1, 2 )
If Eof()
A1[nRow, nCol] = Space(6)
Else
A1[nRow, nCol] = Name
Skip
Endif
Endfor
Endfor
*!*
Matrix_Show(@A1)
lcField = ""
For I = 1 To nCol
lcField = lcField + "Name" + Transform(I) + " C(10), "
Endfor
lcField = Left(lcField, Len(lcField) - 2)
Create Cursor MyTest (&lcField )
Append From Array A1
Go Top
Browse Last