Add Data Column Error like in the following

I just build a data table like in the following

And in the -For Each Activity- after the condition i want to add the column into my data table

but error occurs

Hello @170290064 ,

looks like you already have the column in datatable and trying to add the same column name again

As per your logic, the data in Model Column should be Unique.

But whats wrong adding the same column in the excel sheet

UiPath Data table will not allow you to add columns with the same Name.

can you explain more about your requirement


Date can be the same but other columns are changing.

Idk whats wrong with that :robot:

the excel which you showed is good. Do you want to add a new column or a row.

Let us know what is the output you are expecting.

the output that I’m expecting exactly the same that I showed you in the Excel Sheet so after the condition in the For Each activity if the date greater than the indicated date then I’m going to add new columns modem date and price. That’s it

que-5.xlsx (25.2 KB)

This is the excel file. I ll get data from Otomobil-Modified Sheet. Then write it into the “ModelFiyatlatı” Sheet.

Maybe i should add them in only one “Add Data Column Activity” or “Add Data Row Activity”

:thinking: :thinking: :thinking: :thinking: :thinking: :thinking: :thinking: :thinking:

yes, use add data row

How to write these 3 columns with 1 row with Add Data Row Activity ???

Hi @170290064



1 Like

Use assign activity to filter by date

dtModified.Select(“[İlan Tarihi] > ‘16.07.2023’”).CopyToDataTable

and use filter datatable to fetch the only columns you need


In this way you can achieve your solution without using foreach loop

attaching xaml file for your reference.
excel1.xaml (10.9 KB)

1 Like


If you got the solution for your issue. Please mark it as solution to close the thread and others also helped.


Thanks for all


1 Like

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