Dim t_data As Table = Tables("Main")
Dim t_style As Table = Tables("样式记录")
t_data.StopRedraw
t_style.StopRedraw
For Each r As Row In t_data.Rows
For Each c As Col In t_data.Cols
Dim newrow As Row = t_style.AddNew
Dim flag As Boolean = False
If r.IsNull(c.Name) = False AndAlso r.Index < t_data.Rows.Count - 1 Then
For j As Integer = 0 To 6
Dim s As New List (Of String)
Dim val As String = r(c.Name)
Dim nr As Row = t_data.rows(r.Index + 1)
For i As Integer = 1 To 6
If val = nr(33*j+i) Then
flag = True
Exit For
End If
Next
If c.Index >(33*j) AndAlso c.Index < (33*(j+1)+1) AndAlso flag Then
newrow("样式") = "下期中奖号码"
Exit For
Else
flag = False
End If
Next
End If
If flag = False Then
If c.Name.Contains("未中奖号") Then
newrow("样式") = "未中奖号"
Else If c.Name.Contains("中奖号") Then
newrow("样式") = "中奖号"
Else If c.Name = "期号" Then
newrow("样式") = "期号"
End If
End If
newrow("X") = r.Index
newrow("Y") = c.Index
Next
Next
t_data.ResumeRedraw
t_style.ResumeRedraw