Jump to next column after pasting data

Hello, I have a problem. I try to automate a process which copys the ID out of an Excel file and then looks for information in an internal system. When the bot finds the information, he has to extract the data and insert it into another excel file. Everything works except the filling of the second Excel file.

This is how the second Excel file looks like - it should contain all the information the bot copied. The problem is I don’t know how to jump to the next column after for example column “B” was filled. He should automatically jump to the next column for as long as needed. The perfect solution would be an activity which directly works with the Excel file .

I hope that someone knows how to solve this. Thank you !

@Emma_Micheilis Can you tell us what is your current approach ? How the “Person 1” Column is getting filled up ?

Person 1 is filled up with data from a different database and from Person 2 on it’s the same one.

I use “Screen Scraping” to extract the infromation and use “Write Cell” at B2 and then I continue with the other data. I thought about using a counter variable which increases after every iteration but it only jumps to the next row instead the column.

@Emma_Micheilis Can you maybe consider a Datatable kind of approach ?

I guess it would be possible because afterwards I still can save it as an Excel file. But the problem is that I would net to rebuild the whole process I guess. So the perfect solution would be with Excel. Do you have any idea?


Check as below for your reference
RPA DataTable: Get Previous Row Column Value, Set to Current Row Column Value - #2 by Latif

Hope this helps

Follow Link


@Emma_Micheilis Considering with your current approach that you would need to move on to the next Column, you need something to Increment from “B” to “C”.

Though you cannot do it directly, But using it’s ASCII values you can get the next Character.
So, If 65 is the “A” Character. The below Expression will get you it’s Character value:


You will get the Output as “A”, you can then use this expression instead of the hardcoded “B”.

But will it work for the next columns as well?

So basically I write this code in the “range” field and use the counter as well?

This works with rows instead of columns. But thank you anyway.

@Emma_Micheilis Yes, Can you just give it a Try and check. But also I guess you would need to know the number of columns that you would need to enter the data.


You can assign the value to the next column as well like

DT.Rows(index).Item("ColumnName1") = DT.Rows(index).Item("ColumnName0")

This will assign the value from ColumnName0 to ColumnName1

Is it this you are looking for?

Index will be the counter

Hope this helps you


I think this won’t work because I don’t have fixed column names.

I tried it. Sadly it didn’t work.

@Emma_Micheilis What was the Error that you received ?

I didn’t receive an error but the fields were filled wrong except of the first one column.

@Emma_Micheilis Can you show us a Screenshot of it ?

I need a moment because there is confidential data and I’ll change it reak quick

I looked at it and tried to make it helpful for you but it doesn’t work. Some things are not in the Excel Sheet and others are just overwritten