帮助中
转换代码为Dim dtb As New DataTableBuilder("表B")
dtb.AddDef("班级", Gettype(String), 4)
dtb.AddDef("姓名", Gettype(String), 10)
dtb.AddDef("科目", Gettype(String), 10)
dtb.AddDef("分数", Gettype(Double))
dtb.Build()
Dim kms() As String = {"语文","数学","英语","物理","化学"}
For Each dr1 As DataRow In DataTables("成绩表").DataRows
For Each km As String In kms
Dim dr2 As DataRow = DataTables("表B").AddNew()
dr2("班级") = dr1("班级")
dr2("姓名") = dr1("姓名")
dr2("科目") = km
dr2("分数") = dr1(km)
Next
Next
MainTable = Tables("表B")
接着在后面加一个合计代码,合计分数不显示是怎么回事?
Tables("表B").Cols("分数").GrandTotal = True
Tables("表B").GrandTotal = True \'显示合计模式