How to swap the Data table columns

Hi All,

I would like to swap the second and third columns of the data table using Uipath activities .

Can someone please help me to resolve this with sample .xaml

Thanks

1 Like

Use Build data table and create a table with the order you want and loop the data table which you have and pass the array of values to new data table.

Else write that to excel and use short cuts to modify and again use read data table.

@Bachi_N

Welcome to the UiPath Community. use Invoke Method activity and set MethodName as SetOrdinal Method. Please check below thread and follow the steps.

1 Like

Hi @Bachi_N

You have two Option

  1. One is you can use Set Ordinal Method
  2. second one is dtTest.DefaultView.ToTable(true,“Column1”,“Column3”,“Column2”)

Regards
Amaresan.P

6 Likes

Please refer the link below:

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.