question

Zhen-3549 avatar image
0 Votes"
Zhen-3549 asked emizhang-msft commented

Personal.XLSB is Locked for Editing

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


dotnet-visual-basicoffice-excel-itpromicrosoft-365-apps-publishing-dev
file-in-use.png (60.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

emizhang-msft avatar image
0 Votes"
emizhang-msft answered

Hi @Zhen-3549,
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.






471.png (15.1 KiB)
472.png (35.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Zhen-3549 avatar image
0 Votes"
Zhen-3549 answered emizhang-msft commented

Hi @emizhang-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)

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This question may related to Office develop... You should post to Office developer forum: https://docs.microsoft.com/en-us/answers/topics/192523/office-vba-dev.html
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

0 Votes 0 ·