写了不知道是否高效,自己测试
Dim lst As List(of String) = DataTables("订单").GetValues("产品")
Dim idx As Integer = 0
Dim idx2 As Integer = 149
Dim cnt As Integer = lst.Count
Dim all As Integer = 150
Output.Show(cnt)
Do While True
If cnt > idx2 Then
Dim ar(all-1) As String
lst.CopyTo(idx,ar,0,all)
Output.Show(String.Join("|",ar))
idx += all
idx2 += all
ElseIf cnt > idx
all = cnt - idx
Dim ar(all-1) As String
lst.CopyTo(idx,ar,0,all)
Output.Show(String.Join("|",ar))
Exit Do
Else
Exit Do
End If
Loop