Add column after val3 column
Input:
Expected Output:
Read Range the CSV and Excel file into datatables. Merge Data Table to combine. Alter the column order by using the Filter Data Table activity and simply keeping all the columns in the order you want.
Hi @Garyy ,
I created them similar test data
my input
and
my output
my code
add column with index in excel.xaml (14.2 KB)
hope it help,
regards,
If you have a lot of columns, then it might be more convenient to use an invoke code activity with your datatable (with the new data already added) as an in/out argument, and in the codeblock use the datatable.columns(“ID”).setordinal(int32) method.
My syntax here assumes that the first row in the images you’re showing are used as headers and that they are read to a variable called “datatable”.
Yes @Jay_Yoshimi In another scenario i have lots of column if possible could you send me xaml file