Hi,
I am facing an issue while creating a flow and I am hoping to find a solution here.
Flow: The flow is triggered when an email with an attachment is received in an outlook mailbox. The attachment is always an excel file which must be stored to a destination in sharepoint. The flow is working good up until this point. After saving the attachment in a sharepoint location, the contents of the excel file should be copied and then pasted to a different excel file. The problem that I am facing is while using the Excel "Get Tables" connector ("Get Rows is not available'). The file name field does not allow a dynamic file name value so you have to manually select the location of the filename which you must write the contents of the original excel file to. The problem here is that the flow works fine the first time but the second time it fails giving an error "The file is locked by the user (My own username)".
I have tried introducing a delay but it did not work. I have heard that replacing Sharepoint with OneDrive will work but for the task that I want to automate will need Sharepoint.I have tried searching online but I have found no other similar issue that might help me solve mine. Let me know if you guys know of a solution to this problem.
@Anonymous
Here is something to try - see my example below.
The example attempts to demonstrate how to loop until the Excel action is successful. See the run after configuration on the actions following the Excel action. The variable that I declare is a Boolean and is initialized to false. Please let me know if you have any questions.
Hi Scott,
Thanks for your response but I tried with a delay of 10 minutes and 15 minutes and was still getting the same error, i.e. "File is locked". and the test for that particular flow ran for over an hour. I am not sure how the file would still be locked after waiting for that long. Pease, let me know if there is any other way to do this. Thanks.
@Anonymous
You might try setting your delay to a value over 6 minutes.
The following is from the documentation for the GetTables action:
List rows present in a table
action.List rows present in a table
action supports basic filtering and sorting:
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492