Extract Data from excel sheet

Hi Everyone ,

Can anyone please let me know how to fetch details from the different columns in excel file , by passing a variable . i.e like filtering the excel file .

I Extracted unique values with reference to the column “Account” I would like t get the values for column “Referenece” and "POsting " and store them in a data table

Test.XLSX (19.8 KB)

1 Like

Read column name by using row.item(“Column name”) in for each loop
store row.item(“Column name”) in variable.


Can you please let me know more details ? as I’m new to UI Path i need few more details or perhaps a flow ?

Please follow below steps,
1.Read excel and store into data table
2.User for each row and assign data table variable
3.In for each loop use assign activity i.e variable 1=row.item(“Posting”)
4.same for other 2 columns


Hi @Sandeep_3,
I dont want unique values from the excel sheet for each and every column .

I have unique values from the column “Account” , now I want to pass this unique value and get values from column “Referenece”

I’m looking for a select query of this sort "MasterDatatable.select [Column=Reference] where [Account=“Variable”] " .

Hi @priya_joshi_thaneti
You can get the columns in multiple way.
1- you can use “Get Row Item” Activity and in the properties panel you can provide the column name or index as you want.
2- you can simply assign the value to variable row(0) where 0 is the column index.
3- as sandeep described
Thanks & Regards

Hi @jitendra_123,

Can you please let me know the output in the case you explained ?

Im looking for a totally different output … I’m trying to mimic Excel filter operation using select query by passing a unique value to filter the excel file

which type of filter you want to use ? means what type of output you want so it will be helpful to assign it.


For example if im passing a variable which contains a dynamic variable like
account= 90009
Then I will get an output like this

I want another variable which stores the data of Reference column .
Like for one iteration Reference=GT980663
and for another iteration Reference=GT980663

Main.zip (16.1 KB)
if account no is input as string as you have mentioned in the screenshot, you can use this xaml to get the desire result.
Here i have assigned your “900009” as account value, but you can change it in assign or you can take the value of account in argument also.


Hi @syedabidraza
Thank you very much for the help .

Can you please help me with add data row activity as well .

I’m using add data row activity and adding rows to data table from different locations in the flow .

for example I’m having 5 columns , Account, date,Post,Reference ,ID
I would like to use add data row activity add add the data to the particluar column .Like for example Id like to add date to date column .
Rather than passing all the vaues once in an array like {AccountNumber,CurrentDate,PostNumber,ReferenceNumber,IDNumber}
I would like to add them individually .
can you please help me with it

1 Like

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