How to input data (field to be input is not the same position)

Hi,
i have to input date in my desktop application which i can use Click & Type Into & For Each Activity to do it and it’s fine in case the field to be input is in the same position. but i got problem that some time the field i wanna input is not the same position. could you please advise.

other questions i also try to copy excel sheet for 2 excel file but i cannot use copy sheet Activity (found error when bot copy sheet of the 2nd file) , in case how to filter data in the sheet that i’d already copied could you please guide the activity to solve it.

Thank you.

UiPath has a number of options to handle input boxes not being in the same place each time. Does the label for the input box stay the same? Is there something you can use as an anchor that stays in the same relative position to your input box? The UiExplorer is something you will get VERY familiar with as you try and solve these kinds of problems.
Another thing to consider is whether there are rules that make it appear in different places. If those rules are predictable - maybe you can code for them? Does the page heading change? Are there different elements that exist on the screen? This kind of clues could allow you to add an ‘element exist’ leading to an if statement that has different paths to follow depending on the layout of the screen that the bot will encounter.
I’m not sure I fully understand the second issue you are facing, but there are several examples in the forum of using UiPath to filter in Excel. If the data is in tables, you can also use the filter table activity: https://docs.uipath.com/activities/docs/excel-filter-table
Best of luck!

@natchakrit

If position keep on changing then use Anchor Base activity and try once.

@lakshman
@JohnMac

Thank you all. For my case, the label is the same and the page heading didn’t change will try anchor base activity and for the second question i wanna copy “sheet 1” from excel file “A” and “sheet 2” from excel file “B” to the new excel file the filter it. but i use copy sheet activity but it error message. (copy “sheet 1” from excel file “A” but error found when “sheet 2” from excel file “B”. Thanks.

1 Like

@natchakrit

If both sheet contains same type of data and same no. of columns then do one thing.

  1. Use Read Range activity to read the data from Excel file and will give you output as DataTable and say ‘inputDT1’ and ‘inputDT2’.

  2. Then use Merge DataTable activity to Merge both datatables and then apply filter to it.

  3. Finally use Write Range activity to write into Excel file.

1 Like