Write data to first available column

Hi.
I am trying to find a solution but my mind is drawing a blank.
I need to add the data from one sheet into another but it needs to go in the next available column which will change dynamically.
I have attached a spreadsheet example where I need to take the data from sheet 2 and add it to the end of sheet 1.

Is anyone able to help?
History Test.xlsx (23.0 KB)

Hi @thetruestorey ,

You can find out by reading the data from sheet2 from read range activity.
Now you have to find the column number from which you need to paste data, then write it as

Assign Activity:
columnNumber = dtsheet2.columns.count

Now you have count of column that have data.
Do "columnNumber + 1 " and paste it from that column.

Hi @thetruestorey !
Here is a suggestion: Write_at_first_available_column.xaml (6.1 KB)

What I did: I used read range on both sheets. Then I used Invoke code to call the code of Pieter van der Westhuizen in this article to write the content of Sheet2 in the right coordinate.

The goal of the code is to get from a number (let’s say 100) its equivalent in letters (so CV). Because after Z, excel shows us AA, so we have to use this method to have the right letter(s).
And to get the number, we have to count the number of columns that you have in Sheet1 (so here it will be 7, +1 because we want to write in the 8th column).

Let us know if it does not work as expected, or if you need further information !