Excel to online form

hello,
so i have to read the ‘year of assessment’ in excel and choose the correct year in the form i’m submitting through a webpage.

however my problem is that in excel it’s in a column so the years are given like 2020, 2021, 2022

however in the form, the year selection is multiple choice format by which there’s a button for the different years and i have to select those buttons instead.

how can i read the year from excel and select the correct respective button? for example if excel year of assessment is 2021, then how can i select the 2021 button in the form?

thanks

Hi @meenyi,

As per my understanding. You need to read a cell value from a Excel that contains the year [Ex: 2020, 2021, 2022 etc…]

You have a web form, where the years are mentions in drop-down as well some in buttons. [Ex: Dropdown has 2017, 2018, 2019 …] and missing years in dropdown are mention as button Ex: 2020 as one button, 2021 as another button.

So in this case, your excel has 2021 value and dropdown doesn’t have the value as the button has 2020.

If so,
Use check app state activity with dynamic selector as your year value and identify weather the button has the year value. If not, then the value must contain in drop down and scrap the element with select item activity and choose your value

Solution:

  1. Check app state and click should be dynamic selector as your year value

  2. your logic should look like

Note: I have no proper selector so, shared the logic. Kindly choose the selectors as per your requirement on those activities.

Thanks…,

hello so sorry i think i wasn’t clear in my queries, let me kindly reiterate

what i actually meant was, in excel my ‘year of assessment’ is in this format
IMG_2423

please continue reading in next comment :slight_smile: thanks!

however, in the web form, it only has choices like this for ‘year of assessment’ where it’s just buttons.

how can i read the year from my excel sheet and correctly select the button according to the year in excel sheet

hope this is clearer, thanks!

  1. For reading the excel file. Use Read Range Workbook activity.
    Input should be File Path, Sheet Name and output will be of type Data Table.

  1. For recursive execution of process, use For Each Row in DataTable activity

Code in Assign activity : CurrentRow.Item("Year of Assessment").ToString

  1. Scrap the selector using Click activity with dynamic selector

Dynamic Selector: Passing the variable into the selector [Ex: strYear in above image]

Process logic look like this

Thanks

hello,

for the click activity where do i indicate screen on? is it on my excel sheet or the buttons here

thanks