In csv, I want to add a specific column from one csv file to another csv file add column only 4th

Add column after val3 column
Input:
image
image
Expected Output:
image

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
image
and
image

my output
image
my code
add column with index in excel.xaml (14.2 KB)

hope it help,
regards,

Hi,

How about the following sample?

Sample20230913-1L.zip (2.9 KB)

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