老师好。
我有一个表格,共有同样行数的六列,想实现两个功能:
1.将五六列剪切到三四列后面,然后将三四列的所有数据剪切到一二列的后面。
2.将这个已经集中到一二列的数据,剪切一半出来,黏贴到三四列中(从第一行开始黏贴)。
请问,用代码如何实现,感谢感谢!
您好!就是说如何用代码实现这个四个图片样式的列的自动裁剪过程。谢谢!

此主题相关图片如下:微信图片_20250119211236.png


此主题相关图片如下:微信图片_20250119211259.png


此主题相关图片如下:微信图片_20250119211324.png


此主题相关图片如下:微信图片_20250119211349.png

[此贴子已经被作者于2025/1/19 21:20:11编辑过]
http://www.foxtable.com/webhelp/topics/1533.htm
Dim Cols1() As String = {"第一列","第二列"}
Dim Cols2() As String = {"第三列","第四列"}
Dim Cols3() As String = {"第五列","第六列"}
For Each dr1 As DataRow In DataTables("表A").Datarow
Dim dr2 As DataRow = DataTables("表A").AddNew()
For i As Integer = 0 To Cols1.Length -1
dr2(Cols1(i)) = dr1(Cols2(i))
Next
Next
For Each dr1 As DataRow In DataTables("表A").Select("第五列 is not null")
Dim dr2 As DataRow = DataTables("表A").AddNew
For i As Integer = 0 To Cols1.Length -1
dr2(Cols1(i)) = dr1(Cols3(i))
Next
Next
DataTables("表A").replacefor("第五列",nothing)
DataTables("表A").replacefor("第六列",nothing)
dim c as integer = DataTables("表A").datarows.count / 2
dim k as integer = 0
for j as integer = c to Tables("表A").rows,count - 1
For i As Integer = 0 To Cols2.Length -1
Tables("表A").rows(k)(Cols2(i)) = Tables("表A").rows(j)(Cols1(i))
Tables("表A").rows(j)(Cols1(i)) = nothing
Next
k+=1
Next
DataTables("表A").deletefor("第一列 is null")