Excel File Lock issue

%3CLINGO-SUB%20id%3D%22lingo-sub-1073644%22%20slang%3D%22en-US%22%3EExcel%20File%20Lock%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1073644%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20been%20looking%20at%20an%20issue%20with%20Excel%20as%20part%20of%20Office%20356%20Click-to-run%20(version%26nbsp%3B%3CSPAN%3E12228.20364)%20where%20if%20an%20Excel%20doc%20is%20first%20opened%20from%20within%20Excel%20(open%20Excel%20first%2C%20either%20as%20a%20program%20or%20from%20another%20Excel%20doc)%2C%20and%20this%20Excel%20doc%20is%20saved%20as%20another%20Excel%20file%2C%20the%20originally%20opened%20Excel%20doc%20is%20not%20fully%20closed%20by%20Excel%20and%20is%20shown%20to%20be%20left%20open%20from%20the%20server.%20This%20in%20turn%20causes%20the%20original%20Excel%20file%20to%20be%20locked%20open.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EFor%20example%2C%20%3C%2FSPAN%3E%3C%2FP%3E%3COL%3E%3CLI%3E%3CSPAN%3EUser%20A%20opens%20a%20blank%20new%20Excel%20doc.%20%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EThen%2C%20from%20within%20this%20blank%20Excel%20doc%2C%20User%20A%20uses%20the%20File%20--%26gt%3B%20Open%20option%20within%20Excel%20to%20open%20another%20Excel%20document%20called%20%3CSTRONG%3EInvoice.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EAt%20this%20stage%20User%20A%20has%20both%20a%20blank%20Excel%20doc%20open%2C%20and%20the%20%3CSTRONG%3EInvoice%3C%2FSTRONG%3E%20doc%20opened.%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EUser%20A%20then%20uses%20the%20Save%20As%20function%20to%20save%20the%20%3CSTRONG%3EInvoice%3C%2FSTRONG%3E%20doc%20as%20%3CSTRONG%3EInvoiceCopy%3C%2FSTRONG%3E.%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3EAt%20this%20point%2C%20the%20Invoice%20doc%20appears%20to%20be%20closed%20and%20%3CSTRONG%3EInvoiceCopy%3C%2FSTRONG%3E%20remains%20open%2C%20along%20with%20the%20blank%20doc.%3C%2FLI%3E%3CLI%3EUser%20A%20then%20closes%20%3CSTRONG%3EInvoiceCopy%3C%2FSTRONG%3E%20and%20goes%20to%20re-open%20%3CSTRONG%3EInvoice%3C%2FSTRONG%3E%20but%20receives%20message%20that%20this%20Invoice%20doc%20is%20opened%20by%20'Another%20User'%20with%20only%20option%20to%20Read-Only%20or%20Notify.%3C%2FLI%3E%3CLI%3EIf%20we%20review%20the%20list%20of%20open%20files%20on%20the%20server%2C%20we%20can%20see%20that%20User%20A%20is%20shown%20to%20have%20%3CSTRONG%3EInvoice%3C%2FSTRONG%3E%20doc%20open%2C%20even%20though%20on%20their%20machine%20only%20the%20Blank%20Excel%20document%20is%20open.%3C%2FLI%3E%3CLI%3EAs%20soon%20as%20User%20A%20closes%20Excel%20fully%20on%20their%20machine%2C%20and%20closes%20this%20blank%20Excel%20doc%20the%20original%20%3CSTRONG%3EInvoice%3C%2FSTRONG%3E%20file%20is%20then%20released%20and%20no%20longer%20shown%20as%20open%20from%20the%20server.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EWe%20have%20tested%20this%20extensively%2C%20and%20have%20been%20able%20to%20re-produce%20the%20above%20multiple%20times%2C%20using%20different%20Windows%2010%20machines%2C%20accessing%20the%20Excel%20documents%20from%20different%20Server%20OS's%20(2012%20R2%2C%202016%2C%202019)%2C%20over%20different%20networks%20and%20using%20different%20Excel%20documents.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGiven%20what%20we%20have%20seen%20so%20far%20it%20would%20appear%20there%20is%20a%20potential%20bug%20or%20issue%20in%20the%20way%20Excel%20handles%20the%20above%20scenario%2C%20and%20appears%20to%20lock%20open%20the%20original%20file.%20This%20issue%20only%20happens%20if%20the%20Excel%20doc%20is%20opened%20from%20within%20Excel%20first.%20If%20the%20file%20is%20opened%20directly%20from%20Windows%20Explorer%2C%20the%20problem%20does%20not%20appear%20to%20happen.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELooking%20to%20see%20if%20anyone%20else%20has%20experienced%20the%20same%20issue%2C%20or%20if%20this%20is%20indeed%20a%20known%20issue%20or%20if%20there%20is%20a%20possible%20fix%2Fworkaround%20we%20could%20try.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3ERich%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1073644%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1073712%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20File%20Lock%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1073712%22%20slang%3D%22en-US%22%3EDoes%20this%20also%20happen%20if%20Excel%20is%20opened%20without%20ANY%20add-ins%3F%20(no%20Excel%20add-ins%20but%20also%20no%20COM%20add-ins)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1107800%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20File%20Lock%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1107800%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F493599%22%20target%3D%22_blank%22%3E%40RichSaunds%3C%2FA%3E%26nbsp%3BWe%20are%20having%20the%20exact%20same%20issue.%20Have%20you%20found%20a%20solution%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hi,

 

We have been looking at an issue with Excel as part of Office 356 Click-to-run (version 12228.20364) where if an Excel doc is first opened from within Excel (open Excel first, either as a program or from another Excel doc), and this Excel doc is saved as another Excel file, the originally opened Excel doc is not fully closed by Excel and is shown to be left open from the server. This in turn causes the original Excel file to be locked open.

 

For example,

  1. User A opens a blank new Excel doc.
  2. Then, from within this blank Excel doc, User A uses the File --> Open option within Excel to open another Excel document called Invoice.
  3. At this stage User A has both a blank Excel doc open, and the Invoice doc opened.
  4. User A then uses the Save As function to save the Invoice doc as InvoiceCopy.
  5. At this point, the Invoice doc appears to be closed and InvoiceCopy remains open, along with the blank doc.
  6. User A then closes InvoiceCopy and goes to re-open Invoice but receives message that this Invoice doc is opened by 'Another User' with only option to Read-Only or Notify.
  7. If we review the list of open files on the server, we can see that User A is shown to have Invoice doc open, even though on their machine only the Blank Excel document is open.
  8. As soon as User A closes Excel fully on their machine, and closes this blank Excel doc the original Invoice file is then released and no longer shown as open from the server.

We have tested this extensively, and have been able to re-produce the above multiple times, using different Windows 10 machines, accessing the Excel documents from different Server OS's (2012 R2, 2016, 2019), over different networks and using different Excel documents.

 

Given what we have seen so far it would appear there is a potential bug or issue in the way Excel handles the above scenario, and appears to lock open the original file. This issue only happens if the Excel doc is opened from within Excel first. If the file is opened directly from Windows Explorer, the problem does not appear to happen.

 

Looking to see if anyone else has experienced the same issue, or if this is indeed a known issue or if there is a possible fix/workaround we could try.

 

Thanks

Rich 

2 Replies
Highlighted
Does this also happen if Excel is opened without ANY add-ins? (no Excel add-ins but also no COM add-ins)
Highlighted

@RichSaunds We are having the exact same issue. Have you found a solution?