Excel sheet not accessible by BOT

Hi there,

I’m running a process in Virtual machine. The BOT is suppose to access an excel sheet saved in C drive and further do some processing. Now, whenever BOT is trying to access this sheet, it’s unable to do and throws error - "cannot access “XYZ.xlsx” because it’s been used by different process.

Now, in order to solve this issue below things have already been done:

  • Re-booted the VM
  • restarted the machine
  • deleted the excel file and re-created it
  • checked in task manager whether no excel process is open or running in background

Can anyone please suggest how to make it work.

Have you tried moving the excel sheet to the desktop?

No I haven’t. I have the location configured in code to access the file. Moreover, I did’t mentioned it earlier. But it’s actually working fine for me but not for QA. QA is running a process in the VM and it’s just not ideal to make code changes because QA’s don’t have access to the code. They just run the process through orchestrator/UI robot.

So, do we have any suggestion where we don’t have to play with the code.

Check the filepath to the file if they are logging into a different machine to run the bot, rather then the machine to develop.

I’ve found in my own experience if i was running on a VM i wasn’t able to use direct links

example: “D:\Roles\File.txt” wouldn’t work

I would have to use our server path “\example.group\corporate\roles\file.txt”

The file have been opened somewhere or being accessed by some other user either by shared location or with other user profile. Make a copy of it and place at someother place and see if it works. Let me know your approach and final outcome when resolved

If you are using workbook activities, please try replacing it by excel activities

Thanks all for your suggestions. Well I advised QA to removed Excel application and re-install it. It worked for them. Quite weird though was the issue.