Need To create datatable by adding values from variable using for each loop

Im extracting data from different different excel and want to add those values in one data table by row by row and needs to write that datatable in excel.

i want this approach to just overcome the execution time because Im using RE-Framework for my process and every time excel get open to write the cell hence need some different approach

Hi @omkard222,

i would suggest reading your excel file with a read range activity. That will save all the data into a data table. Then add your new data rows with the acitivity add data row in a for each loop to that data table in UiPath. After that you can write the whole new data table to an excel file via write range activity.

Kind regards
Patrick

Hi @omkard222
1.use read range activity in excel application scope for read the full sheet.
2.then use for each activity for get the items row by row. Use assign activity with in the for each.
Assign the variable for items in the assign activity.
3.and use generate data table activity then call that variable.
Cheers​:beers: buddy :grinning:

2 Likes

hi @sowndaryacse1505 ,

actually im Extracting queue item from orchestrator doing some operation and assigning bunch of values in variable and wants to add those variables one by one to data table as row.

can you just provide me how to use add data row activity to add bunch of variable in same DT.

if possible please provide xaml file

@omkard222 Can you tell us How many Columns you have in the Datatable?

10 columns

@omkard222 The values in the Queue are those values of a Particular Column or Values of Each Column?

@supermanPunch values of each columns

@omkard222 Then if you get all Column Values from the Queue, You can use Add Data row Activity Specifying the Datatable Name, and in ArrayRow Property Specify the Values in this Format :
{value1,value2,value3,…} . I think this way you can create a Datatable

1 Like

ok got it

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