I don’t know how your file is shared but you might find some hint below for onedrive. I don’t know if you you have a mean to “kick out” already editing the file but you might detect the situation.
One suggestion could be - When we are Reading the excel and the excel is Open - we get an exception saying File is in use by some other Process. -
we put this part in the Try Block - In the Catch Section for Filein use Exception - we can handle it 2 ways
We can create a copy of excel and continue automation with the copied version. At the same time we send an email to the Concerned Team to close it before the Next run.This will Not Break The automation - But You might loose the changes that the person has Done.
We Stop the Process by logging a Message and Emailing to the Team saying Excel was Opened and Process is Terminated. Close the Excel and Re Trigger the Automation.