How to manage Report Files while users have it open?

Pretty much every bot I develop for my company, I have a system of creating a daily report file containing a list of each transaction by the bot so that users can go and see the status of each row of an input, so they can see if it was successful by the bot or failed for various reasons. For example, I’ll use the input filename and line number and an exception reason or ‘Success’ message, and some other basic stats/totals.

I usually use the format of say BOTNAME_DD-MM-YYYY.xlsx so that they can easily view the performance of the bot on a daily basis, occasionally I will make this monthly instead.

The issue I have is, users tend to hit Start on the bot and then they are eager to open the report file and then while the bot is running it is unable to write to the same Report file while open by another user… the only workaround I have for this so far is for the Append Range activity be in a Try/Catch block and waits until the file is ready. This works fine, but users will be unaware the bot is ‘waiting’. I try to explain to them that when they run the bot, they need to ensure that any report files/input files are not open by other users or this will interrupt the process. But they don’t really follow my advice…

Is there a better way to manage this? Obviously, the bots need to write some kind of report file for client facing reporting on the bot status of each input/line processed. But I haven’t worked out a good system to avoid users interrupting the bot processing.

Hi @Jon_G

One workaround I can see is instead of writing the data in the shared drive(where anyone can open the file), write the data inside your project folder or your folder where no can access the file, and once all the transaction Is completed and the file is ready copy or move the file you prepared to the shared drive where all the users can view.

The point is once the bot placed ithr file n the common folder , it should not try to access the file again,as some users open the file randomly.


Helo @Jon_G ,

I too agree with the above answer, but if you want the users to check while the BOT is performing, may be you can add the status in Notepad as well. In this example below I will open the notepad after message box appears, then press “OK”, so the BOT will perform the rest. Close the Notepad and open it again, you can see both the text written. (2.1 KB)