Dim dtb As New DataTableBuilder("XJHHZLSHZB","乡级河湖长临时汇总表")
dtb.AddDef("xzMC",Gettype(String),4,"","乡镇名称")
dtb.AddDef("xjhzXM",Gettype(String),6,"","乡级河长姓名")
dtb.AddDef("xjhzDH",Gettype(String),11,"","乡级河长电话")
dtb.AddDef("xjhzZW",Gettype(String),20,"","乡级河长职称")
dtb.Build()
Dim xms As New List(of String)
For Each dr1 As DataRow In DataTables("表1").DataRows
If xms.Contains(dr1("xjhzXM")) = False Then
xms .Add(dr1("xjhzXM"))
Dim dr2 As DataRow = DataTables("XJHHZLSHZB").AddNew()
dr2("xzMC") = dr1("xzMC")
dr2("xjhzXM") = dr1("xjhzXM")
dr2("xjhzDH") = dr1("xjhzDH")
dr2("xjhzZW") = dr1("xjhzZW")
End If
Next
xms.Clear
....