以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]按行号自动填充,咋弄? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=22246) |
-- 作者:yangrou -- 发布时间:2012/8/7 10:53:00 -- [求助]按行号自动填充,咋弄? 表a的数据,按行号,填充到临时表,咋弄啊?给个代码吧~!这个我已经看过了 http://www.foxtable.com/help/index.html?n=1533.htm,可还是不会 |
-- 作者:yangrou -- 发布时间:2012/8/7 11:12:00 -- 很多事情,没办法做到静下来看书。。。。。。 |
-- 作者:狐狸爸爸 -- 发布时间:2012/8/7 11:53:00 -- 为什么按行货填充? 这有意义吗? 一定要按行号的顺序填充,也只旭稍微变通一下即可,通过Table取行,而不是通过DataTable: Dim Cols1() As String = {"来源列一","来源列二","来源列三"} Dim Cols2() As String = {"接收列一","接收列二","接收列三"} For i As Integer = 0 To Tables("表A").Rows.Count - 1 Dim dr1 As Row = Tables("表A").Rows(i) Dim dr2 As Row = Tables("临时表").AddNew() For i As Integer = 0 To Cols1.Length -1 dr2(Cols2(i)) = dr1(Cols1(i)) Next Next |