How to read excel cells, then copy in browser and check data availability

Hi team,

What would be the best practice to do the following
1- look for student name in application - if available check the available letters then type yes or no
image

1 Like

For this , U can go through every student details in app. and then check which letters are available, if it available, put yes corresponding to that Student , otherwise No

I f you can give more details on how applcations details with screenshot, i can give a sample workflow which can help to do this
Regards,
Nived N


I am attaching these photos , hope it can help giving some details.

different names, and each name have different documents related to it (it has common keywords)
So:
1- take the name from excel
2- look for it in desktop app
3- name is found look for the documents available (related to keywords to search with)
4- if the document is available type yes next to document title in excel file

Try these steps:

  1. Read your excel file data using “Read Range” activity and store output to a datatable variable(lets say dt1)
  2. Now initialize an int32 variable(let’s say Counter) and give a default value as 1.
  3. Now use while loop.
    While(Counter < dt1.Columns.Count)
    {
    4. Now create one string variable(let say StudentName) and assign the value as dt1.Columns(Counter).ToString(). We are starting counter with 1 because dt1.Columns(0) is not any student name.
    5. Now you have StudentName. You can use it in your type into activity to type in your application and then click enter.
    6. After getting results in your application, scrape the table into a data table variable(lets say ResultsDT)
    7. Use for each loop. For each row in ResultsDT
    {
    8. If(row.item(“ColumnNameOfYourAppResultsWhereYouWantToSearchData”).tostring().contains(StudentName)
    {
    if(row.item(“ColumnNameOfYourAppResultsWhereYouWantToSearchData”).tostring().contains(“No objection letter”)
    {
    Use write cell activity and write “yes” against this student name in your excel sheet for no objection letter.
    }
    Now use else if and check for “Student results”. You can use an elseif block for each type of file you want to check.
    }
    }
    Increment counter value by 1
    }

Remember, this is just a pseudo code. Build a workflow based on these steps.

Hi @ahlam.alawi.aa.92 ,

Try using this skeleton workflow to achieve your task.
Let me know for any issues.
Skeleton.xaml (11.8 KB)

Remember this. You know column number here. While writing “yes/no” to your excel, you need column name in your write cell activity.

Try this piece of code for converting column number to column name:

    Dim dividend As Integer = columnNumber
    Dim columnName As String = String.Empty
    Dim modulo As Integer

    While dividend > 0
       modulo = (dividend - 1) Mod 26
       columnName = Convert.ToChar(65 + modulo).ToString() & columnName
       dividend = CInt((dividend - modulo) / 26)
   End While

Thank you , I did check the work flow, but what is Max stand for?

thank you for your effort, do you have project sample?

It’s just the naming convention just change it as per your convenient.

The only thing decision is checking is that the icounter value should always be less than dt.rows.count (Max count).

Hope you get it.

Yes, got it thank you … and where I put the part to check the student name availability in the application?

where to type this code plz?

I have invoked one workflow, just create new workflow and put your logic of getting student info from web app whether it is present or not.
And don’t forgot to out variable of student1 and studen2.

Inside invoke code activity

Not developed any project. I’ll do it if I find time

Type Into ‘sdummy’: Could not find the user-interface (UI) element for this action.

Possible solutions:
• Ensure application is opened and the UI element is visible on the screen at execution time
• Edit the Target of the UI activity and use Validation to debug the issue.
• If needed, re-indicate the element as its properties might have changed
• Use “Check state” activity to check the application state before executing the action
• Increase the “Delay before” value to allow time to the application to render entirely and become responsive

I got this error , I think it didnt knw the name …

thank you will try it

1 Like

In the type into activity, you can indicate element, validate selector and highlight it. Were you able to get unique selector when you developed workflow?

If yes and still getting error, try those possible solutions and let me know if there are still any challenges

image

it is valid , but not sure why value not passing

Did you try possible solutions given in your previous post

was not able to get unique selector - no id for selector