How to write the values into the excel

Hi Everyone,

I need help to write the condition into an excel.
That is “Clinical submission is not required for Group”
If above statement(which is inside the double quote " ") contains the key word “Not required” then I need to update in excel that “No Authentication required” else the excel to be update as “Yes Authentication required”, I need to update in column B the name of the column is “Authentication”.
Kindly someone help me to achieve this.

@Palaniyappan
@jack.chan
@geetishree.rao *
@Nagabhushan_I_S
@lakshman
@ushu
@Gokul001 emphasized text
Thanks in advance

Hi @HeartCatcher

Your requirement is not tht clear but still will try to provide you what i have understood

I guess that condition what you posted there is in column A and column B is called Authentication

so first read the excel and have output as a datatable

  1. Use for each row activity and pass the datatable variable .
  2. Use an if activity inside for each row.
  3. Condition for if condition

string isnullorempty(Currentrow(“Column1”).ToString.ToLower.Contains(“not required”))

  1. In then part of if activity use an assign activity

Currentrow(“Authentication”) = “No Authentication Required”

  1. In ELSE part of if activity use an assign activity

Currentrow(“Authentication”) = “Yes Authentication Required”

At final

Write the datatable into the excel using write range activity.

Hope this helps Thanks

1 Like

Update excel based on value in another column - Help - UiPath Community Forum

Thanks for your reply.
Actually the process is as below:
1:Login to the portal.
2: Then do some click activities.
3: After that I need enter 6 digit number which is in (excel or database)using type into activity and on submit.
4: After clicking submit there will display either one Statement like
“Authentication is required to the User Id” or “Authentication is not required to the User Id”
5: I need to scrap the either one statement based how the portal display.
6: If the statement contains the keyword then “not required” then I need to update the column “Authentication” as “No Authetication”
7: If the statement contains the keyword then “Required” then I need to update the column “Authentication” as " Authetication to be give"


Sample portal

Ok Got ur Use case @HeartCatcher

The above logic i have posted works almost 75 % just initial there are small changes

so Lets say the statement is stored in variable Str_Text

i guess u will still have a datatable with column called authentication and also which has 6 digit numbers

so generallly u will be using for each to get 6 digit number row by row

so in same for each continue my above operations

also have get text inside the for each (Str_Text)

string isnullorempty(Str_Text.ToLower.Contains(“not required”))

  1. In then part of if activity use an assign activity

Currentrow(“Authentication”) = “No Authentication Required”

  1. In ELSE part of if activity use an assign activity

Currentrow(“Authentication”) = “Yes Authentication Required”

At final

Write the datatable into the excel using write range activity.

1 Like

Hi @HeartCatcher

Hope you have got the logic,
If so kindly close the topic

Thanks
Happy Automation

Thanks For your time

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.