Readable log file

Hello everyone,
I am running a process with UiPath which is extracting information from Excel.
If it is executed succesfully, i want it to enter on a new row “OK”.
If not “KO” with the failing cause.
How Can I do it???


Do you want to write status of that row in new column right ? If it success then ‘OK’ else failing error.

Yes that’s it.
For instance, the robot will treat “Case1”. If treated successfully, I want it write in a new row “OK”. Else error and the type of error.
How do I proceed?


  1. Use Read Range activity to read data from excel and will give you output as DataTable and say it as DT.
  2. Then iterate it using For Each row activity

Assign int Index = DT.rows.indexOf(row)+2

If check condition
Then use Write cell activity and specify below:
Range: If it is ‘E’ column then “E”+index.tostring And value: “OK”

Else use Write cell activity and specify below:
Range: If it is ‘E’ column then “E”+index.tostring And value: “Failing error”


I still don’t get it.
Do you have a worfklow example ?


Please find the sample file. Change condition and all according to your requirement.

Main.xaml (10.6 KB)

1 Like

Thanks a lot.
In this case it is just related to excel activity if I understand well.
In my case, it is linked with web automation.
For instance, the process is “close insurance file”.
It gets the insurance file number from excel, browse through the insurance application and close it.
Just after closing it , I want a log file which stated “Closed successfully” or “not closed successfully”+error type


I said its just sample but approach is same only. you are reading data from Excel and processing it in web browser. After successful processing will it generate any successful message or not. If yes, then use Get Text activity to read that successful message and write into the corresponding cell else write error message in the cell.

It is wroking Thanks!!!
Now how to send the excel file updated in a Email ?

1 Like


After process completed and same updated in Excel then use send Outlook Mail activity to send mail and add attachment to that mail. If you have Outlook application installed then use that activity. Else try with other mail activities.

Thanks !!! Can the results be filtered and sent to specific clients ?
FOr instance , it will filter agency A and send the information specific to it.
Then same thing for agency B, C …

You can use the Filter Data Table wizard for that last step.

How exactly?
How can it filter based on “Agency name list” and send to Agency specific Email.
For instance, it filters on agency A then send to Agency Mail A
Thenn Agency B and so on.

Filter the table each time by Agency Name. Output each to an individual dt_AgencyName datatable.

Then you have datasets for each individual email.

If the Agency Names are in a list or an array, iterate through that and carry out the above action on each item, the output goal is a datatable per each Agency Name.

Thanks a lot!
Can you provide me with a drawn example?

Here you are. Sample datatable with data associated with two agencies.

The table is filtered and split by Agency, outputting the details to separate CSVs.

TestSeq.xaml (8.7 KB)