How to read an excel sheet and put the cell value within different text fields through UiPath?

How to read an excel sheet and put the cell value within different text fields through UiPath?

I have a excel sheet as follows:


I have read the excel contents and to iterate over the contents later I have stored the contents in a Output Data Table as follows:

  • Read Range - Output:

  • DataTable: CVdatatable

  • Output Data Table

  • DataTable: CVdatatable

  • Text: opCVdatatable



Finally, I want to read the text opCVdatatable in a iteration and write them into text fields. So in the desired Input fileds I mentioned opCVdatatable or opCVdatatable+ "[k(enter)]" as required.



But UiPath seems to start from the begining of the Output Data Table whenever I called for opCVdatatable.

Inshort, each desired Input fileds are iteratively getting filled up by all the data with the data stored in the Output Data Table.

Can someone help me out please?

1 Like

@debanjan assuming that your text field is getting populated with the same value in the opCVdatatable.You need to use a for each statement to iterate through the datatable output and use row item to enter into your text field


@amr07 Thanks much. As per the flow, the contents of the excel sheet needs to be filled within text fields and those text fields are within a sequence:


This sequence contains a Attach Window where the several text fields are located:


Can you suggest a possible way to implement the foreach loop please?

1 Like

please find the attached.I have done this is in sequence if in doubt just shout.
row.item(“here you can give either column name or column no”)

excel_demo.xaml (7.4 KB)


can you please mark the solution if it fits your need?:slight_smile:

1 Like

@amr07 Thanks for the flowchart. Actually for me the challenge is to iterate through the contents (from a DataOutputTable) and fill in four text fields which are in a sequence of an Attach Window event.

1 Like

@amr07 One counter question. As you did row.Item("header").ToString in your workflow, in my workflow the rows contains the desired text example 1000, 0001, etc. So what expression I use?

is this what you looking for?

Flowchart_excel.xaml (10.7 KB)

you can give row.item(0) or if you have an header name for your column you can give column name

1 Like

Hi @debanjan if it worked please tick solution

The solution turned out to be simply referring to the DataTable created by Read Range.

CVdatatable.Rows(0).Item(0).ToString+ "[k(enter)]"

@amr07’s answer was the perfect solution as per the prevailing details provided within the question in it’s current state.

1 Like

Thank you.Can you please mark the solution?

@amr07 Your first comment is already marked as a solution. Can you direct me to some documentation about the benefit of getting the answers accepted in this community?

Am also new to this,as far as i know it helps other forum members their quest to learn and explore,with each accepted answers and likes you would be rewarded badges…

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