Add multiple new columns at specific location in Excel

How can I add multiple columns at specific locations to an Excel file ?
Can you help me ?

thank you for your help

@mina.dilek

can you explain more about your requirement

There are about 10 columns that I need to add to certain places in an Excel report. I made only one, but I wonder if there is a method for more than one.

@mina.dilek

You can try adding no of columns using invoke code activity

I did it like in this video for a single column and it worked, but it is needed for more than one column.

@mina.dilek

Either use a for loop with how many ever column you need and start inserting from the last column

Or use multiple times the same activitiy with different values

For loop you need to first construct a dictionary with key as column name and value as the index …and loop through dict.keys and inside loop use column name as currentitem and column index as Cint(dict(currentitem).ToString)

Cheers

Hi
Try this 2 activity

  1. Use the Add Data Column activity. This activity allows you to add a single column to a data table. You can specify the name of the column, the data type of the column, and the default value for the column.
  2. Use the Insert Column activity. This activity allows you to insert a column at a specific location in a data table. You can specify the name of the column, the data type of the column, and the location of the column.

Thank you