How to get several "get row item" in UiPath

If i am not getting you wrong you wants to use Multiple times “Get Row Item” Activity?? or? something else?
Check that again. It works…


1 Like

Hi @aksh1yadav . I have the same question as @MichaelC

If I need to "get row item’ for 30+ variables, is there a shortcut way or do I need to individually setup 30 “get row item” activities? For example, is there a way to write a script for this?

Why can’t you use the DataTable variable(arguement) all through the project?

For eg: The below will return the Age column value from 1st row


or you can use foreach whereever you need.

  1. You can get the row values in a dictionary and pass it as arguments to multiple workflows.

    Dictionary<String, String> items = new Dictionary<String, String>() {
    {“name 1”, “value 1”},
    {“name 2”, “value 2”}
    {“name 3”, “value 3”}

1 Like

Thank you @vvaidya . I have not used arguments or dictionary until now. I will work through the examples:

here for arguments and,
here for dictionaries

Hi @aksh1yadav, is it possible to use get row item ones and select all the columns for that row. If I have over 50 columns, its quite troublesome to get row item for each column over 50 times.

1 Like

Hey @tobor, @MichaelC and @ZacZ

Yeah i have a way,

Please find below attached sample workflow and let me know if any doubts you have :slight_smile:

Single_GetRowItem_to_fetch (15.9 KB)


Hi @aksh1yadav, it looks great! just a quick question, im pretty new to UiPath, where can I find all the functions like dt1.Columns.Cast(Of DataColumn).Select(function(x) x.ColumnName).ToArray(). Im not sure which are the syntax that are compatible in UiPath :slight_smile:

Btw how do I paste them into excel workbook in the same format? I don’t really know how to iterate row by row, so currently if I use add data row, all the information will be in one column instead of row by row

what you wants to paste?


@aksh1yadav basically im trying to select certain entries and write those rows to another excel workbook. The video tutorial from the website shows how to do that if there are a few columns, Excel Automation Tutorial - DataTables Automation | UiPath, for this video, the last example is what I am trying, just that instead of the 3 columns, is there a way to read multiple columns at the same time instead of creating a get row?

what i am getting is you want to store data(By using Add Data Row?) into datatable so you can write it into an Excel file ???

Video is not playing because of security policy.

or still facing problem with the above thing?

Yes that’s right @aksh1yadav

This link will help you on this:

just pass that datatable to a write range activity inside an excel application scope.


1 Like

Hey hi @aksh1yadav I just need explanation for the code " dt1.Columns.Cast(Of DataColumn).Select(function(x) x.ColumnName).ToArray()." what is that function(x).? what x stands for?? Please reply me as soon as possible. because i need same line of code to extract data…


Hello mate, what is the variable type that you have selected for col_name variable?

You can see it in variable pane easily.

as you asked - It is String[ ](String Array).


Sorry for late reply. Did not get notification sometimes :slight_smile:

x is a lambda expression that returns whatever argument it’s provided with.It’s equivalent to a method declaration.


It is also known as the identity function

@aksh1yadav Hi, Please can you explain the code item.ToString+“=”+data I need it for some work.

hey @narayan_shrawagi

That was for debugging to check the values what i am getting :slight_smile: nothing much .


HI @aksh1yadav

my xaml file:
Main.xaml (13.8 KB)

these are details i gave see the two screenshots:

Again why we are using the DataTable here ? see the output screen too 234 records showing ?
In that i am get a data in a single column only is not like in pdf what we expect ?

output of excel sheet find below:
Untitled.xlsx (10.6 KB)

Please find the excate pdf file format how it is ? it has 10 column and two customer name and 12 records only.
see the attchment of pdf file too .
1090444_COMS_Commission Statement[1].PDF (148.3 KB)


Hi Guys,
Below is my requirement,
if the duplicate names exist in column how to select the first row of duplicate column