Dim s As Date = Date.Now()
DataTables("任课教师分析").DataRows.Clear()
Dim Values() As String
Dim n As Integer = Tables("教师安排").rows.count
Dim n1 As Integer
for Each dc as Datacol in DataTables("教师安排").Datacols
if dc.name <> "班级" Then
n1 = n1 +1
dim f As New Filler
f.SourceTable = DataTables("教师安排") '指定数据来源
f.SourceCols = dc.name & ",班级" '指定数据来源列
f.DataTable = DataTables("任课教师分析") '指定数据接收表
f.DataCols = "教师,班级" '指定数据接收列
f.Distinct = false
f.Fill() '填充数据
For i As integer = (n*n1)-n to Tables("任课教师分析").rows.count -1
Tables("任课教师分析").Rows(i)("科目") = dc.name
Next
end if
Next
Messagebox.Show("处理完毕! 耗时: " & (Date.Now -s).TotalSeconds)