一题多解,交流下!
说明:班级列为数值类型
dim h as integer = Tables("样本").count\3\3
DataTables("排列表").DataRows.Clear()
dim j as integer = 1
dim f As New Filler
f.SourceTable = DataTables("样本") '指定数据来源
f.SourceCols = "班级,姓名" '指定数据来源列
f.DataTable = DataTables("排列表") '指定数据接收表
f.Append = false
for i as integer = 1 to DataTables("排列表").datacols.count/2
f.DataCols = "班级" & i & ",姓名" & i '指定数据接收列
f.Filter = "[班级]>=" & j & "and [班级]<=" & j+h-1
f.Fill() '填充数据
j += h
next
[此贴子已经被作者于2008-12-9 19:26:51编辑过]