How to check row by row in excel

Hello,

Need some help here.Based on image below, i am trying to have the function where if the column status (Column D) showing “Failed or Pending” the robot will email to me but if the status showing “Generated” it will go through each row until the last row which is ‘blank’ and will proceed to the next steps.

UntitledID_0981 - Monthly RI Retailer (07_03_2018) (20181402).xls (28.5 KB)

Hey @Fizzy

It is simple task to do.

Steps:

  1. Read your excel by using Excel Application Scope.
  2. Use Read Range to read excel and it will return a Datatable for you.
  3. Then use For each Row activity and then use if condition to check your (row(“Status”) = Failed) or (row(“Status”) = Pending).
  4. then use Send mail Activity to send an email.
  5. else block leave blank so it will process next row item.

Try it at your end.

if still not able to do , let me know.
Better to try at your end first :slight_smile:

Regards…!!
Aksh

Hi @aksh1yadav…Thanks for your help. This condition (row(“Status”) = Failed) or (row(“Status”) = Pending). showing an error. can you please help on this

Untitled

row.item(“Status”)=“Failed” or row.item(“Status”)=“Pending”

They are datatable objects so you have to convert them either in string with which you are comparing them

like below: -

(row(“Status”).ToString().ToLower()=“failed”) or (row(“Status”).ToString().ToLower()=“pending”)

Regards…!!
Aksh

@Fizzy following attached file may be useful pease check i change your excel column two rows to
Failed and Pending

CheckRowByRow.zip (11.9 KB)

Thanks guys for your help! however the process cannot identify “In progress” status but for other status it working well. do you know why?
exl_prod=“Failed” or exl_prod=“Pending” or exl_prod=“In progress” or exl_prod=“FI Failed” or exl_prod=“Intermediate Failed”

Hi Guys,

Can you please help to look at my workflow.
3 problems i am facing right now:-

  1. every month i have different name of the excel file. for example this month For example this month the file name “ID_0981 - Monthly RI Retailer (07_03_2018) (20181402).xls” and next month the name will be change to “ID_0982 - Monthly RI Retailer (10_04_2018) (20181503).xls”. i am trying to use for each and assign the variable but i am getting the error.

  2. Second is, the process cannot identify the status “In progress”. it supposed to send an email if the status “In progress” is showing in column D but it not working. For other status, it works

  3. Third is, If the status is all “Generated” it just need to send one email mention the “DB is ready” but what happen is, it send email for every row that showing “Generated”.

Hope someone can solve this. Thanks in advance.Open Excel.xaml (3.0 KB)

For number 1, I would do something like this:

If you are only doing work once a month, I would manually delete the old Excel-file and replace it with the new file. If you get all the Excel files in one go, you could loop through the directory as shown in the picture.