microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.85k stars 6.58k forks source link

Peek - Releasing of Personal Macro Workbook resource when Previewing Excel files #29580

Open randose opened 1 year ago

randose commented 1 year ago

Microsoft PowerToys version

v0.75.1

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Peek

Steps to reproduce

  1. Create a Personal Macro Workbook in Microsoft Excel.
  2. Open PowerToys, and use Peek on any Excel file.
  3. As long as the same instance of PowerToys remains running, it will never release the Personal.xlsb resource...
  4. Launch Microsoft Excel, and you get this File in Use warning: Personal.xlsb File in Use Warning

PowerToysReport_2023-10-31-21-36-42.zip

✔️ Expected Behavior

Upon closing of the Peek window, the Personal.xlsb file should be released.

❌ Actual Behavior

Peek fails to release the Personal.xlsb resource until PowerToys is terminated.

Other Software

Microsoft Excel (via Microsoft 365 Apps for business) Version 2310 Build 16924.20106 Click-to-Run)

gokcekantarci commented 1 year ago

Hi,

I tried to reproduce the bug by creating a new xlsb file, but it did not happen to me. I can open file Can you share the Personal.xlsb file with me? Can you also elaborate the steps a little more so that I can reproduce it? /needinfo

randose commented 1 year ago

Hi,

I tried to reproduce the bug by creating a new xlsb file, but it did not happen to me. I can open file Can you share the Personal.xlsb file with me? Can you also elaborate the steps a little more so that I can reproduce it? /needinfo

Sure thing. A Personal Macro Workbook is different from any ordinary .xlsb file - it is a special .xlsb file that Excel automatically opens in the background every time you launch Excel. The Personal.xlsb file can be created a few different ways, the most common of which is by using the "Record Macro" feature.

First, ensure you have the Developer ribbon tab enabled:

  1. On the File tab, go to Options > Customize Ribbon.
  2. Under Customize the Ribbon and under Main Tabs, select the Developer check box.

Next, follow the steps from this Microsoft support article, copied below:

  1. Go to the Developer tab, and click Record Macro.
  2. In the Record Macro dialog box, don't bother entering a name for the macro in the Macro name box. You can accept the name that Excel gives you, such as Macro1, since this is just a temporary macro.
  3. When you do start creating macros of your own, you'll want to give them descriptive names, so you know what they do.
  4. In the Store macro in box, pick Personal Macro Workbook > OK. This is the most important step, because if you don't already have a Personal Macro Workbook, Excel will create one for you.
  5. Click Developer > Stop Recording, and Excel will have created your Personal Macro worbook.
  6. When you close the workbook, you'll be prompted to save both the workbook, and the Personal Macro workbook.

The Personal Macro workbook gets stored to your XLSTART folder, which is typically located at Users\\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB.

From that point forward, Excel will automatically open the Personal.xlsb workbook in the background every time Excel is launched so that your personal macros are universally accessible from any other workbook you open.

This is the resource that is not released by Peek. Please note that I have also seen Microsoft Community posts which indicate that the Windows Explorer Preview Pane has the same issue when previewing Excel files.

I hope my additional information will help you find a solution. Thanks!

gokcekantarci commented 1 year ago

Hi,

Thank you for giving all detailed steps to create a personal macro book.

During this time, I reproduced the bug and tried to solve it. I tried to solve the bug by trying different methods, but I could not solve the problem. Then, I tried that in the file explorer preview pane and encountered the same bug there. After talking about this issue with my teammates, we thought that this might be a bug in Excel. There is nothing we can do about this at this stage.

Bug is reported in Feedback Hub and Office feedback system.

randose commented 1 year ago

Hi,

Thank you for giving all detailed steps to create a personal macro book.

During this time, I reproduced the bug and tried to solve it. I tried to solve the bug by trying different methods, but I could not solve the problem. Then, I tried that in the file explorer preview pane and encountered the same bug there. After talking about this issue with my teammates, we thought that this might be a bug in Excel. There is nothing we can do about this at this stage.

Bug is reported in Feedback Hub and Office feedback system.

Hi @gokcekantarci , thank you for taking the time to recreate the bug and attempt to solve it. I understand that since this issue seems to persist through all applications (including Windows OS) that use the Excel previewer, it would appear to be a bug on the part of Excel rather than Peek.

Is it possible for you to link to the Feedback Hub topic with this bug request so I can track it? And, should I close this Issue since you've officially declared it is not a Peek bug?

gokcekantarci commented 1 year ago

Hi, https://aka.ms/AAnret7

You can check the feedback hub link. @jaimecbernardo can give better information about when and how the issue should be closed.

jaimecbernardo commented 1 year ago

Let's keep it open :) I'll mark it with External.

jaimecbernardo commented 1 year ago

Would prefer this to be findable, that's why it's not being closed yet ;)