Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
表中分别有 第一列、第二列、第三列、第四列、第五列;
要将 第一列、第二列、第三列、第四列、第五列里的内容以:“第一列/第二列/第三列/第四列/第五列” 形式连接起来(例如其中某列没有内容,则不连接它)
更正一下:
Dim r As Row = Tables("表A").Current
Dim s As String
For Each c As Col In Tables("表A").Cols
If c.Name <> "第十列" Then
If r.IsNull(c.Name) = False Then
s = s & r(c.Name) & "\"
End If
End If
Next
r("第十列") = s.Trim("\")
更正一下:
Dim r As Row = Tables("表A").Current
Dim s As String
For Each c As Col In Tables("表A").Cols
If c.Name <> "第十列" Then
If r.IsNull(c.Name) = False Then
s = s & r(c.Name) & "\"
End If
End If
Next
r("第十列") = s.Trim("\")
加个判断看看:
Dim r As Row = Tables("表A").Current
Dim s As String
For Each c As Col In Tables("表A").Cols
If c.Name <> "第十列" Then
If r.IsNull(c.Name) = False Then
s = s & r(c.Name) & "\"
End If
End If
Next
if s > "" then
r("第十列") = s.Trim("\")
end if