Append range - how to ensure the file is not used by another process

In my workflow I update the Excel file by Append range activity.
Quite often I get this error:
Append Range: The process cannot access the file MyDataTable.xlsx’ because it is being used by another process.
Is there a way to pause the workflow until the file is “released” ?


You can actually introduce a delay activity to pause the workflow for some amount of time. But, it is not a good practice because we don’t know how long it will take for the file to be free to use by the workflow. The best way to deal with that situation is to introduce a try catch activity. and place your Append Range within the Try segment. Catch the System.IO Exception or System.Exception. If the exception is caught, you may send a alert, or get some log records created, or may be retry…

Thank you @Lahiru.Fernando
I think Try /Catch is the best option. The best way is to retry in my case. I also introduce a small delay in the catch section.

1 Like