Foxtable(狐表)用户栏目专家坐堂 → [求助]怎样在同一单元格内追加字符串


  共有2423人关注过本帖平板打印复制链接

主题:[求助]怎样在同一单元格内追加字符串

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/8/8 9:57:00 [只看该作者]

单独做一个按钮执行

 

Dim tjdr As DataRow = DataTables("统计").find("试卷号 = '1'")
Dim kfdr As DataRow = DataTables("答案").find("试卷号 = '1'")
tjdr("A") = Nothing
tjdr("B") = Nothing
tjdr("C") = Nothing
tjdr("D") = Nothing
For Each dr As DataRow In DataTables("卷1").DataRows
    Dim t1 As String = dr("题1答")
    Dim d1 As String = kfdr("题1答案")
    Dim t2 As String = dr("题2答")
    Dim d2 As String = kfdr("题2答案")
    Dim ts() As String = {t1, t2}
    Dim ds() As String = {d1, d2}
    Dim name As String = dr("姓名")
    For i As Integer = 0 To ts.length-1
        For Each s As String In ts(i)
            If ds(i).Contains(s) = False Then
                If tjdr.DataTable.DataCols.Contains(s) Then
                    tjdr(s) = tjdr(s) & name & ","
                End If
            End If
        Next
    Next
Next
tjdr("A") = tjdr("A").trim(",")
tjdr("B") = tjdr("B").trim(",")
tjdr("C") = tjdr("C").trim(",")
tjdr("D") = tjdr("D").trim(",")


 回到顶部
总数 15 1 2 下一页