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
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.
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
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ā
yes, use add data row
Hi @170290064
{CurrentRow(āColun1ā).ToString,CurrentRow(āColun2ā).ToString}
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)
If you got the solution for your issue. Please mark it as solution to close the thread and others also helped.
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.