Personal.XLSB is Locked for Editing

Zhen 6 Reputation points
2021-09-04T19:57:02.967+00:00

Did anyone see the warning (Personal.XLSB is Locked for Editing) when an application tries to launch an excel document after a different excel document is open manually?

The files are coming from my own machine. It is ok (no warning) if I launch an excel document manually after a different excel document is open manually.
It is also ok (no warning) if an application launches an excel document after another application or the same application launches a different excel document.

PS
Windows 10 Enterprise
Microsoft 365 Apps for enterprise

No password for any excel documents for testing

.NET 5 VB project
Dim filePath As String = "C:\Users\Zhen.Z\test-epplus.xlsx"
Dim psi As ProcessStartInfo = New ProcessStartInfo(filePath) With {.UseShellExecute = True}
Process.Start(psi)

129343-file-in-use.png

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,578 questions
Microsoft 365 Publishing
Microsoft 365 Publishing
Microsoft 365: Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line. Publishing: The process of preparing, producing, and releasing content for distribution or sale.
595 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,643 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Emi Zhang-MSFT 22,011 Reputation points Microsoft Vendor
    2021-09-06T02:41:38.807+00:00

    Hi @Zhen ,
    Based on the message, I suggest you try these methods:

    1. Hide the preview pane in Windows File Explorer, then reboot.
      129432-471.png
    2. Open Excel- go to File- Options- Advanced- check the option "Ignore other applications that use Dynamic Data Exchange (DDE)"
      129462-472.png

    I also suggest you refer to this article:
    https://poetengineer.postach.io/post/how-to-fix-file-in-use-personal-xlsb-is-locked-for-editing

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    6 people found this answer helpful.

  2. Zhen 6 Reputation points
    2021-09-06T20:44:08.307+00:00

    Hi @Emi Zhang-MSFT ,
    We don't have the issue when opening an excel document by Microsoft.Office.Interop.Excel in .NET framework 4.7.2 project.
    Is there any property we can set in ProcessStartInfo to achieve the same result? Thanks,

    PS
    .NET 5 VB project
    Dim filePath As String = "C:\Users\Zhen.Z\test-epplus.xlsx"
    Dim psi As ProcessStartInfo = New ProcessStartInfo(filePath) With {.UseShellExecute = True}
    Process.Start(psi)


  3. Wayne Dantzler 0 Reputation points
    2024-02-20T20:32:03.16+00:00

    This was an issue for me related to a macro I created. Option 2 in the answer from Emi Zhang-MSFT corrected the read-only issue for me.

    0 comments No comments