How to Add data column with values

Hi! after a write range activity,

  1. I am trying to add a column in my data table.

  2. In the new column that I am creating I want to add a value. The value I am adding into every row of the new column is the same.

Please guide me with this step. Many Thanks!


Hi and Welcome to uipath community

  1. Use add data column activity to add the column with the data table and then use for each row in data table assign current row(columnindex)=value
  1. Use Add Data Column Activity to add a columnName
  2. For Each Row In DataTable=>Property Panel Create Variable in the field index.
    i)Assign=>CurrentRow.Rows(index).item(“ColumnName”)=Value(Which ur going to assign)
    That’s it…Index means the position of the rows.

HI @Abdul_Khaliq1

Welcome to uipath community

  1. Go to activity panel → Filter → Show Modern [Select]

  1. Use the Excel Process Scope activity

  2. Use the Use Excel File activity

  3. Use Insert Column activity


  1. Use Read Range activity → Store it as DtRead

  2. Use For each row in Data Table activity

Inside the For each row in Data Table

  1. Use assign activity
CurrentRow("Your ColumnName Or Index")="Your Output value"

Outside the For each row in Data Table

  1. Use Write Range activity


Hope it will helps


Hi @Abdul_Khaliq1

Check out XAML file

AddColumnInExcel.xaml (11.5 KB)

Hi Abdul,

As per your requirement you wanted to add a new column and the value of that column in each row is same so, considering this my soulution are as follows:

1: User Add Data Column activity Processing: 16703913928484959571719374612831.jpg…

2: In properties mention tha data table name and the column header name which you wanted to add
3: In properties ther is one option " Default Value" please mention you default value in that field which will automatically added in all row in that column.


I am Still not able to get the results. take a look at my sequences. Maybe this would be a clearer picture of what i am trying to do

Have you checked this XAMl ? @Abdul_Khaliq1

I am actually working on a workbook activity. I cant use the Excel activity

@Abdul_Khaliq1 you could use write range workbook activity then

I tried this but it did not create a new column.

Maybe the following could be a factor:

  1. my data table was created by data scraping
  2. I am using workbook activity

Are you trying to achieve something like this? UiPath - How to add data to a new Excel column - Full Tutorial - YouTube
you can do the same with Workbooks activities.

Hi Abdul

Add column activity you can use in extracted datatable

Please use add column activity before write range activity

and check the result in Excel file.

Perfect! Thanks a lot!

One more, lets say i am doing another round of data scraping and i append range to the data table i already created before, how do i add data to the column that i created in the earlier step. is the below step correct?

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