如果要整行复制:With Tables("表名") .Rows(.Rows.Count - 1).Clone
End With如果要单独复制某几列,请在DatarowAdding事件中设置代码:
Dim ColNames() As String = {"第一列","第二列","第三列","第四列"}
Dim dr As Row = Tables("表A").Current
If dr Is Nothing Then
Return
End If
For Each ColName As String In ColNames
e.DataRow(ColName) = dr(ColName)
Next
ColNames数组包括要复制的列的名称,请根据需要修改列名和表名: