以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 我哪里的问题呢? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=72600) |
||||
-- 作者:ykhsen -- 发布时间:2015/8/2 17:31:00 -- 我哪里的问题呢? Dim fls As New List(of String) fls = DataTables("表C").GetValues("第一列") Dim r As Integer = 0 Dim fl0 As Integer = 1 For Each fl As String In fls Dim fs() As String = fl.Split("/") Dim c As Integer = 1 Dim fl1 As Integer = 1 Dim fl2 As Integer = 1 For Each f As String In fs Tables("表C").Rows(r)(c + 1) = f If r = 0 Then Tables("表C").Rows(r)(c) = "01" Else Select Case c Case 1 If Tables("表C").Rows(r - 1)(c + 1) <> f Then fl0 = fl0 + 1 fl1 = 1 fl2 = 1 End If Tables("表C").Rows(r)(c) = Format(fl0,"00") Case 3 If Tables("表C").Rows(r - 1)(c + 1) <> f Then fl1= fl1 + 1 fl2 = 1 End If Tables("表C").Rows(r)(c) = Format(fl1,"00") Case 5
If Tables("表C").Rows(r - 1)(c + 1) <> f Then fl2 = fl2 + 1 End If Tables("表C").Rows(r)(c) = Format(fl2,"00") End Select End If c = c + 2 Next r = r + 1 Next
|
||||
-- 作者:有点蓝 -- 发布时间:2015/8/2 20:00:00 -- 如果想要大家帮忙,请描述清楚你想要的问题 |
||||
-- 作者:大红袍 -- 发布时间:2015/8/2 20:18:00 -- For Each r As Row In Tables("表C").Rows Dim ary() As String = r("第一列").split("/") For i As Integer = 0 To ary.length-1 r(Tables("表C").Cols(i*2+1)) = format(i+1,"00") r(Tables("表C").Cols(i*2+2)) = ary(i) Next Next |