命令窗口执行:
Dim nms() As String = {"W39","W40","W41","W42","W43","W44","W45","W46"}
For i As Integer = 0 To Tables("需求表").Rows.count - 2
Dim r1 As Row = Tables("需求表").Rows(i)
Dim r2 As Row = Tables("需求表").Rows(i + 1)
If r1.IsNull("CustomerPN") = False AndAlso r2.IsNull("CustomerPN") Then
Dim dr As DataRow = DataTables("交货计划表").find("CustomerPN = '" & r1("CustomerPN") & "'")
If dr IsNot Nothing Then
For Each nm As String In nms
r2(nm) = dr(nm)
Next
End If
End If
Next
你这种格式,似乎在把foxtable当做excel用了