Inserting Column Into Excel w/ Existing Data

Hello @Tal294

For you retirement we need to consider two things.

  1. How to find the right most column
  2. What would the excel column letter for that…

To get the excel column letter, use can refer to below post
How to Write to Excel CELL index v.2 - #4 by badita

Now, to find the number of columns you already have, you can do something like this.
Do

  1. Read range to read the excel into a datatable.
  2. Now use an assign activity with the below code

DT.columns.Count
This will give you the number of columns you have.

Now refer this number to the logic provided in the link I shared above and get the excel column letter.

Now you can simply do a Write Cell activity as you know the column and write the value you need…

If you have multiple rows, do this in a loop to loop through all the rows

1 Like