以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]字符串合并 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=151173) |
-- 作者:miaoqingqing -- 发布时间:2020/6/17 9:10:00 -- [求助]字符串合并 求助根据横竖第一行列值合并字符串。 手机UC浏览器上传图片了,没显示。坛主后台可以看到上传图片嘛?
[此贴子已经被作者于2020/6/17 9:12:23编辑过]
|
-- 作者:有点蓝 -- 发布时间:2020/6/17 9:31:00 -- 没有看到。http://foxtable.com/bbs/dispbbs.asp?boardid=2&Id=78 如果不成功,多试几次,直到发表区有上传后的文件链接
|
-- 作者:miaoqingqing -- 发布时间:2020/6/17 12:13:00 -- ![]() ![]() 根据横行竖列,合并字符串,求助
|
-- 作者:有点蓝 -- 发布时间:2020/6/17 13:33:00 -- dim t as table = tables("表A") dim r as row = t.current dim cls() as string = {"第二列","第三列"} for i as integer = 1 to t.rows.count - 1 for each c as string in cls t.rows(i)(c) = r(c) & "+" & t.rows(i)("第一列") next next
|
-- 作者:miaoqingqing -- 发布时间:2020/6/17 14:22:00 -- 回复:(有点蓝)没有看到。http://foxtable.com/bbs/... ![]() ![]() 坛主,上面代码有点问题
|
-- 作者:miaoqingqing -- 发布时间:2020/6/17 14:23:00 -- ![]() ![]() |
-- 作者:有点蓝 -- 发布时间:2020/6/17 14:28:00 -- Dim t As Table = Tables("表A") Dim r As Row = t.Rows(0) Dim cls() As String = {"第二列","第三列"} For i As Integer = 1 To t.rows.count - 1 For Each c As String In cls t.rows(i)(c) = r(c) & "+" & t.rows(i)("第一列") Next Next
|
-- 作者:hongsejiyi -- 发布时间:2020/6/17 14:32:00 -- Dim t As Table = Tables("表A") Dim r As Row = t.rows(0) \'指定标题行(第一行 行号为0) Dim cls() As String = {"第二列","第三列"} \'按需要指定需要处理的列名 For i As Integer = 1 To 2 \'这里只是处理第2,3行 (行号就是1和2,版主那里就是除去第一行(0)以外的所有行(t.rows.count-1) For Each c As String In cls t.rows(i)(c) = r(c) & "+" & t.rows(i)("第一列") Next Next
[此贴子已经被作者于2020/6/17 17:21:16编辑过]
|
-- 作者:hongsejiyi -- 发布时间:2020/6/17 14:35:00 -- ![]() ![]() Dim t As Table = Tables("表A") Dim r As Row = t.rows(0) \'指定标题行(第一行 行号为0) Dim cls() As String = {"第二列","第三列"} \'按需要指定需要处理的列名 For i As Integer = 1 To 2 \'这里只是处理第2,3行 (行号就是1和2,版主那里就是除去第一行(0)以外的所有行(t.rows.count-1) For Each c As String In cls t.rows(i)(c) = r(c) & "+" & t.rows(i)("第一列") Next Next [此贴子已经被作者于2020/6/17 17:21:40编辑过]
|