Excel Add column in between existing columns and Mapping of data from another Excel file

Hi All ,

I have excel file , in that file i need to add column between existing columns.Data needs to be mapped from another excel file.

please help me with this…


1 Like

Hi @SagarSB,
One way to do it is by using hotkeys. In Excel application scope for the excel you want to copy from, you may place ‘select range’ and ctr+c, then in Excel application scope for the excel where you place your data put F5 to get ‘Go to’ window, type in the first cell of the column where you want to add a new column (e.g. B1), hit enter, then ctr+space to select that whole column (here: column B) and ctr+shift+= to add a new one. Later with ctr+v you may just paste the copied data. Does this solve your problem? Here you can see it as shown step by step

Here you can find some more on this topic:

can we achieve this without using hotkeys??

Hi @SagarSB,

Please see the attached workflow. It reads the range you choose from the first spreadsheet (‘Test1’), then adds a column to the second spreadsheet - ‘Next1’, where ‘Invoke method’ moves the added column to the column C - by ‘Parameters’ set to Value 2), and finally the copied range is written in that new column. Does the attached workflow help in solving your problem? :slight_smile:columns2.zip (14.4 KB)

1 Like


Thank you so much

Did you use any of the suggested solutions, or something new? :slight_smile:

I have used your solution only.
Thank you again…

hi pad , i just want to Add columns at particular location without any data ,
Can u please help me

Hi @SagarSB,
Have you tried the solution as attached? Does this work for you? Adjust the position of the new column in ‘Parameters’.

add blank column.zip (8.0 KB)

@PAD It is adding columns but at the end it is adding unwanted columns

How do you mean: unwanted? How do you exactly want to process it? Do you want to add your columns at the end, or between certain columns? do you want to replace any data?

in between …

But At end it is adding columns like column1 to column30

@PAD I am able to add columns into sheet but after my datable columns it is adding Column1 to column30 …are you getting my problem?

Hi, what exactly do you put in your automation? All is technically needed (when you have the output Data Table variable), is ‘Add data column’, where you apply that variable and assign Column name - this activity creates the extra column at the end of the table. Then, to move it to the required place you use system.Activities.Statements.InvokeMethod with the method ‘Set Ordinal’ etc using its ‘Parameters’ Value. Then you use ‘write range’ to keep the new adjusted table. Are these columns 1-30 what you are trying to add in between? Or you are trying to add something else and they add completely ‘out of blue’?

It is not unwanted …!!
can you share your workflow. it is by write range and datatable how you are writing in sheet. of it will not find any suitable header with datatable which you are writing it will create a custom header with convention column0,column1…columnN. depends on columns counts on datatable.


1 Like