Dim dtb As New DataTableBuilder("test") For Each dr As DataRow In DataTables("表A").Select("第一列 is not null") If dr("第二列") = "字符" Then dtb.AddDef(dr("第一列"), Gettype(String), 32) ElseIf dr("第二列") = "数值" Then dtb.AddDef(dr("第一列"), Gettype(Double)) End If Next dtb.Build() MainTable= Tables("test")