Problem with fetching data

Hi All,

Badly need help on fetching data from an excel file and entering it into a drop down.

So I have an excel file that look like this.


So here are my problems:

  1. When I tried entering the value ONE from row TEAM to its drop down, the bot will read it but will return error as the values from drop down are typed in (proper case) One, Two and so on.

  2. I just need to get the value of the previous month. Say today is 8/1/19, I need to get the value of row “Jul” and enter them in a drop down but the values available in the drop down are Pass, Waived and Failed. 1= Pass, 0=Waived and -1=Failed.

Please help. Thanks!

  1. You can use String manipulation and if/switch statements to change ONE to One, something like this:

One.Substring(0,1) + One.Substring(1).ToLower

  1. You will split the Date/String with Split Method, something like Date.Split("/"C) then put that in a String variable, and select the 0 index StrArr(0).

After that make three empty Variables, one called MonthName(Type String) and other one named Status (Type String) and MonthValue (type Int32)

Make a Switch statement, with all the months, and compare StrArr(0) value to months
Case 1 > MonthName= “JAN” and so on. Now you have months.

After that use For Each Row on the DataTable and check the value of the month for each row.
Now still in the loop get the value of the month for each row. use row(MonthName) and store that value in the MonthValue variable.
After that use Switch statement again to see if the value was 1,-1 or 0 and store the value accordingly to Status variable.
Now you have all the information, you just need to create dynamical selector with values of Status and complete your task (Note you are still in the loop)