cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
moutinhoabreu
Level: Powered On

Re: Flow causing error code 423 file locked by user

I have a similar problem.

My scenario was super simple:

 

  1. Blank excel with a table inside.
  2. Populate that excel with insert row action (excel online) (ok)
  3. Create a new file with content from excel step 2 with a new name and differente location. (ok)
    1. Had to delay flow for 1 minute before allowing him to move next step
  4. Overwritte the original blank file (Step 1) with a blank excel file with a table. 
Spoiler
Error. File blocked by myself. 

Tried a differente approach by replacing the original file at the begining of the process but now the file is blocked.,

 

I do think Flow engineers should take a more serious approach on excel connectors, since they released a preview with a bunch of mistakes and i do mean mistakes instead of Beta testing. For instance if you try to create a file from a excel file filled by inser rows you need to delay the flow, otherwise you will get a trunced version of the file. Just as an example, but there's more.

 

I've been building a flow using excel connector for a week and its a completely nightmare. 

frederikbisback
Level: Powered On

Re: Flow causing error code 423 file locked by user

Dear, you need to use Excel for business. for example:
User Get Rows (Excel for Business), using this will not lock the file and after getting the rows you are not able to add or change fields in the Excel file.
You can find an example on my blog: https://blog.pronict.net/2018/12/06/ms-flow-05-buttons-excel-approvals-and-notifications/
Regards,

Frederik Bisback
fjimenez
Level: Powered On

Re: Flow causing error code 423 file locked by user

Hi Frederik,

 

Thanks for your input.  The problem is that Get Rows does not support excel files with formulas. Thanks again for your input.

MattC_A
Level: Powered On

Re: Flow causing error code 423 file locked by user

Sigh. I'm getting this problem too.. the retry mechanism in the Settings for the Excel Insert Row operation looked perfect.. but they don't work with this particular error. I've raised an Idea will will hopefully get some traction for getting it fixed/working with the table locked error.

 

https://powerusers.microsoft.com/t5/Flow-Ideas/Excel-retry-options-should-work-with-file-locked-erro...

Skewa
Level: Powered On

Re: Flow causing error code 423 file locked by user

Hi all

I'm experiencing the same problem. There are many threads on this topic and varying suggestions

I have a Flow that takes an Excel spreadsheet from an email attachment and copies it to a folder on SharePoint.

That file is used for a Power BI dataset so the Flow also jumps into the file and creates a table using the Create Table - Excel Online (Business) step. This is so Power BI can see the data table.

 

  • This is the only flow referencing this document
  • There is no other users accessing the file except the one running the flow.
  • I'm using the Excel Online (Business) connectors with SharePoint (I also tried the non-business connectors and OneDrive and had the same issue)
  • The flow runs every 45 minutes
  • The Flow fails at the SharePoint Create Item step

A few days ago it was running and succedding 1 out of 3 times. The other two would fail with Error 423.

Currently the Flow is failing every time with 423 and the file has been locked for over 24 hours. I even removed the folder permissions in SharePoint for the account that runs the flow and SharePoint/Flow still thinks it has it open.

 

I also tried being clever and made the Flow create a new file each time with a stripped down UtcNow() expression as a prefix. Unfortunately the Excel connectors make you select a file using the file picker and you can't use a dynamic path which would include the prefix.

 

Has anyone had any luck with the 423 error?

 

A few other reference threads

Retry-settings-for-Excel-operations-blocked-by-423-file-locked

File-Locked-Condition

Getting-error-The-file-is-locked-for-shared-use-by-when-updating

ACPriebe
Level: Powered On

Re: Flow causing error code 423 file locked by user

I have the same issue as the original poster.  Others have added in issues with Excel (online) and locked files.

 

I have tried to use an email trigger to Update File Contents, but file is usually locked, when email arrives every 24 hours.  I have tried to use a File Created in Sharepoint Folder, when users upload to sharepoint rather than emailing. However the file is usually locked when they upload every day.

 

I believe the issue is with Flow not closing the connection with a file, even after a flow has completed.  Yet even when I create a file and use it for the first time, in testing, it is still locked before first use.

flowBolICT
Level: Power Up

Re: Flow causing error code 423 file locked by user

The same problem here:

The file is created by flow, not opened by anyone.

 
  "errors": [
    "-2147018894",
    "Microsoft.SharePoint.SPFileLockException"
  ]
 
Highlighted
attitude08980
Level: Powered On

Re: Flow causing error code 423 file locked by user

Hi All,

I don't know if that is the solution, but at least I had that problem "423". At first I had the file only "on-line" in SharePoint and also I tried on OneDrive. But those folders wasn't sync with my PC. 

I tried in one SharePoint Folder sync with my computer and the same Flow works, then I sync the folder where it was the original file and works too.

Hope help you.

rjhale
Level: Powered On

Re: Flow causing error code 423 file locked by user

Did anyone ever come up with a proper solution for this? 

 

I'm running into a similar problem where I need to refresh a Power BI dataset (which is a published Excel workbook), however; the refresh keeps failing because it says the workbook is open.  This happens even though the Power BI dataset refresh is one of the first steps to run, and I have a 5 minute delay after it.  It's almost like the Flow is pre-staging the lock on the file or maybe it's failing to close the file when it completes.  

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 473 members 5,598 guests
Recent signins:
Please welcome our newest community members: