How to choose a checkbox dynamically based on data in Excel

Hello Friends,

Can you help me “How to choose a checkbox dynamically based on data in Excel”
Please find the attachment.

For every record we have to read application details and select in website.
For eg.
1st row–>7-Zip,Adobe Reader

Bot should check both application in website and it should be dynamic because application count can be increase or decrease in any row item.

Please help me here.


Try using anchor base activity with anchor on name and have innertext property in it and make it a variable to pass the value extracted

use for each row in datatble to loop through each row

then use another for loop to select each value from cell using currentrow("Application").ToString.Split({","},StringSplitOptions.RemoveEmotyEntries) and change the type argument to string

Now inside the second loop use the anchor base check box and assign currentitem value to the variable or the innertext value of the selector


Hi @Jeeru_venkat_Rao ,

Could you check the selector of any one of the application name in the website ? Use UiExplorer so that we could get a hold many attributes that are available and we can confirm on which attribute we can use.

We can then perform a loop on those items alone by Splitting the values using a For Each Activity and use a Click Activity with a modified selector. For more info on the modified selector, we would need to have a view on the Screenshot of the UiExplorer if having issues with modifying the Selector.

Below are 2 attachment of selectors.

  1. I indicated on whole table of that application details.

  2. Here I only indicate on individual item. IDX number changes every time when different application select.

@Anil_G --Will try this one.


you can include tablecol property in second one and then idx might not be there…

and one more apporach would be to get the tablerow atrribute using the selector for application name on innertext attribute
and then use the tablerow property to identify the check box correcponding to it

tablecol might be 1 for check box and 2 for application name


@Anil_G --I tried but the loop not ended. In str_AppNames have 2 app names, but loop not exit, it run 3rd time and stop the bot. If loop works fine then my bot almost work perfectly, I guess. Can you tell me where I am wrong here in this code.


As mentioned earlier…first loop should be on datatable you have the data…

And second loop should be on

I see your loops are on something else


@Anil_G - Bro Can you review and correct the code which I have uploaded. I am facing some errors. I tried in different approach but now I am doing your approach. Can you correct and resend it, that would be great help.
Main.xaml (42.8 KB)

Main.xaml (42.8 KB)
Please find the Xaml and correct me where I did wrong.
in str_AppNames have 2 application names but loop should run 2 times only but it runs more, that is the issue.

Finally, after much effort, I discovered and corrected the error. My bot is now fully operational. Thank you for your responses, friends.

1 Like


Happy automation…couldn’t reply earlier