Get failed rows from Excel which is not processed on Website correctly . Send in Email at last

I am struggling to get the some failed part in Email. Can someone help me to get this ?

(1) I want to process some data from Excel File through Website.
EX: Row 1 is success on WEb. Row 2 and 3 is failed to process on Web. Continue untill last row.

(2) I want to get all failed Row item from Ex: Column 1 (1234) in the email body at last to send the user that these is the failed numbers.

Thank you


It’s better if you can share a sample excel file how the data is arranged

If you want the failed rows from excel then you can use filter datatable activity

  1. Use Read Range activity to read the excel and declare a variable which is datatable, let say dtexceldetails
  2. Now use Filter datatable activity and give column which is the failed Let’s say “Column2” = “Failed”-> This should be exactly the same as the row has
  3. you can use Write range activity to write the filtered data to another excel
  4. Now you can use send outlook message activity to send the email

Hope this may help you



I am guessing you’re processing each row with the help of for loop. Please follow below steps to achieve the same.

  • Use the ‘Build data table’ activity before for loop and add headers. We will store failed rows in this data table. Let’s name it Failed_DT.
  • Use Try block Inside ‘for each row in data table’. Keep your code inside the try block only.
  • Now write your code to process the row in the website. In case of success, update the status in the same table. Use the 'throw ’ activity to raise business/system exceptions in case of failure.
  • In the cache block, Create a business rule exception handler and inside that use ‘add row item’ and add the current row to Failed_DT.
  • After completion of for loop, write the Failed_DT data to email and send it to whoever you want.

Let me know, if you have any further doubts on the same.

Ashutosh Gupta

Hey , @Ashutosh.Gupta Looks like these is what I want. Few questions still.

I am finding Row 1 from Excel on Website if it founds then process further if not then It is the failed .
Same way other conditions also if found and failed in the middle of the web process that is also failed.

So in this scenario , Do I need to use throw activity and catch block for the failed one ? Because I have to use IF condition to check some conditions if available , If available then matching the value ?

Please provide help.

Thank you

Yes. Inside every if condition you can add throw activity for failed situations. In case of failure, the transaction will automatically go to cache. Then it will update the failed DT and then proceed with the next transaction in the loop.

Ashutosh Gupta

Thanks @Ashutosh.Gupta I will try this scenario and let you know if anything needed.

Thanks Again for the support.

You are welcome. @PALKUMARI_PATEL

If this resolves your issue, Then please mark this as the solution to close this thread.

Ashutosh Gupta

1 Like


Add column to the excel file name as “Status”
Use “For each excel row” activity to Iterate the excel rows, fetch data and use data in the website.
If the data in the web is success then use “Write cell” activity to update the status as “Success” in the excel.
If the data in the web is failed then update the status as “Failed” in the excel.
After first For each row in excel activity add one more For each row excel activity to iterate the updated excel file.
Inside the loop take a “If” activity to check the status = failed then send a mail in the else block.

It may helps you @PALKUMARI_PATEL !!

1 Like

@Ashutosh.Gupta @mkankatala Can you provide me an sample file ? Also Putting different conditions to catch failures so how Can I get those data into data row ?