How to make the Column dynamic in write cell activity


How can i make the column to be dynamic in the write cell activity.

I am using the for each row activity to read from a data table, and then want to write each row value into excel on a new column. So first writing to Column B, C… AX etc.

Steps to do that @tharinda

  1. Declare a variable and initialize the value with 1 (assume count)
  2. Increment the value whenever you want (after writing the values in one column)
  3. Use a if condition to check if that value is greater than 26 or 52 whatever
  4. Then convert it to string using Convert.Tochar(64 + Count)

if it is greater than 26, then A+Convert.Tochar(64 + (Count - 26))

Hi, Thanks a lot for the solution and taking the time.

I ended up using the following solution developed by @aksh1yadav.

Used a column count to get number of counts populated, inputted the count +1 into the workflow and then got the address of the empty column, the letter.

Excel_Column_Name_mapping.xaml (6.1 KB)


Thanks for sharing @tharinda … that will help some others with the same question

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.