KevinDS
(Kevin Da Silva)
1
I have 2 datatable:
The thing is: the client wants the robot to change the order of the columns putting: name, company, adress and telf.
I was thinking doing this assigning the columns in a new datatable using
assign
dt2 = dt1.columns(“name”)
but i dont know how to do this. Can you help me?
ppr
(Peter Preuss)
2
@KevinDS
give a try on
Assign Activity:
left side: dtReordered
right side: dtOriginVar.DefaultView.toTable(“False”, {“name”,“company”,“adress”,“telf”})
otherwise we can change the datacolumn position with the SetOrdinal method from the DataColumn
3 Likes
Hi Kevin,
There are two ways to change column sequence:
- Use setOrdinal method to change sequence of column.
- To get specific column use : DT_Table.DefaultView.ToTable(False,“ColumnName”) and you can write range this column to new excel file.
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.