Opening Excel document from Sharepoint creates a second window

Copper Contributor

Hi

When I try to open an Excel-file from Sharepoint it opens a second window (pic below). I think it has something to do with when you create macros in your personal workbook then Excel opens your personal workbook when you open a file from Sharepoint. I've tried hiding the personal-file, but I still get two Excel windows when I open files from Sharepoint (like the picture below) I've followed several guides and i've practically tried everything to make it go away but no luck. Deleting the personal-file deletes the macros and I want to avoid that.

Anyone got any ideas? I use Microsoft Office 365 apps for enterprise 

 

Cheers



opening file from sharepoint.jpg

13 Replies

@r0uladen 

is it always the same file?

 

Have you ever checked whether the file is possibly in the XLStart directory or whether a folder should be entered under EXTRAS - OPTIONS - General under "Load all files in this folder when starting"?

 

Does personl.xls start with you, which may contain code that reloads this file?

 

Try the following in advance (maybe that's it, never know:):

Window menu - Arrange windows - Vertical - Ok.

You should now see two windows of the same file.

Once with: 1 and once with: 2 at the end.

Close one of the two windows.

 

Thank you for your patience and time.

 

Nikolino

I know I don't know anything (Socrates)

@NikolinoDE I'm wondering if your problem was resolved?  I'm having the same issue with an Excel file.  It just started a couple of weeks ago.  I open a file from SharePoint and two copies open.  A change that is made in one is reflected immediately in the other.  How do I solve this?

So you have to ask roulades if he could solve his problem with it. Or you can carry out the same steps yourself.
Or I misunderstood everything again for once again through the translation :))
Apologize in advance ... if so.

@r0uladen I'm wondering if your problem was resolved?  I'm having the same issue with an Excel file.  It just started a couple of weeks ago.  I open a file from SharePoint and two copies open.  A change that is made in one is reflected immediately in the other.  How do I solve this?

@62Fender 

Are the files in OneDrive?

... that is more suitable for personal use, in my humble opinion.
Or are your files in SharePoint Online?

... is more suitable for a team with several employees.
Operating system?

 

Control when external references (links) are updated

you find.....

Control links to other workbooks

Manually update all or none of the links in a workbook

Manually update only some of the links to other workbooks

Change the source workbook of one external reference without affecting other external references in the destination workbook

Control the startup prompt for updating links

Edit Link options

Frequently Asked Questions

 
 

Thank you for your understanding and patience

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here

 

 

@NikolinoDE

The problem magically solved itself yesterday. The file was stored in SharePoint. I opened it yesterday, closed the one copy and started editing. After saving and reopening, it only opened the one copy. No idea what that was all about.
If it works, it works ... Murphy's Law :)

I hope you continue to have fun with Excel.

@r0uladen 

Same problem. As soon as my spreadsheet is moved from my local computer to either SharePoint or my personal OneDrive, opening it in Excel 365 does exactly what's described. I do have macros but they're in the Personal Macro Workbook, not any of the sheets I open. Closing the empty Excel window closes the workbook I want. My workaround (not solution) is:

  1. In either Excel window, on the View tab's Window group, click Hide. This hides both windows but leaves Excel running. (The fact this works from either window also proves there's an association between the two, just like closing either window closes both.)
  2. From the View tab's Window group, click Unhide and select your workbook. The unhides your workbook in the running window and doesn't re-open the empty window.

SNAG-20210413-131953-0160.png

 

I have a little theory this might be related to hidden(?) temp files on the local machine that are necessary due to the source being SharePoint/OneDrive. It never happens with local files. It always happens with SharePoint/OneDrive files. It doesn't matter whose SharePoint I'm connected to, mine, a client's, etc.

@NemanSyedOfficial The easy way to fix this, or at least it worked for me.

  • Select the blank window
  • Click on 'Save As'
  • Copy the address to an explorer window (note the name of the file it is wanting to save as)
  • Close the empty excel window
  • delete the file in the XLSTART explorer window that was causing the blank window.

Good luck!

@AWCombs thank you! As it turns out, it's not something I can delete - it's my Personal Macro Workbook!!

NemanSyedOfficial_0-1620743248250.png

This isn't what I expected. I was expecting a temp file or some other form of detritus. I believe this must be some sort of bug that comes out of old tech + new tech. It's quite annoying, but I may have to live with it until someone at Microsoft finds it equally annoying enough to fix. Much appreciated!

@NemanSyedOfficial If you don't need the macros with every excel workbook, you could probably cut it and paste to a personal folder elsewhere and manually open it when you need those macros.

I hope you find a solution.

Tony

Good idea, but it's my use-all-the-time goodies macro workbook. I find it really interesting this only happens with stuff that comes from SharePoint/OneDrive for Business and OneDrive, Maybe I'll write a macro just to toggle the hidden state of the newly-opened workbook. Hah!

I haven't solved this problem, but have a less-ugly workaround. In my personal.xlsb (the cause of, and solution to, many hours of grief in my life :D ) I created a new macro:

 

Sub HideRedundantApplicationWindow()
' If you open Excel directly, i.e. not opening a workbook but just Excel,
' personal.xlsb is properly hidden. This is normal and good.

' If you open Excel indirectly by opening a locally saved workbook,
' personal.xlsb is properly hidden. This is normal and good.

' If you open Excel indirectly by opening a SharePoint- or OneDrive-hosted workbook,
' it opens two windows! One is for the workbook, and one appears blank.
' The blank one is actually personal.xlsb. That window shouldn't be visible.

' Toggling the visibility of the visible workbook's window solves this problem. (Why?)

' UI equivalent of this macro is:
' 1. From the blank window, choose View > Hide
' 2. View > Unhide > DesiredWorkbook.xlsx

' Assign this to the Quick Access Toolbar or give it a keyboard shortcut.

Dim MyWin As Excel.Window
Dim HiddenWindow As Excel.Window

    For Each MyWin In Application.Windows
        With MyWin
            'MsgBox .Caption & " is " & .Visible
            If .Visible = True Then
                Set HiddenWindow = MyWin
                HiddenWindow.Visible = False
                HiddenWindow.Visible = True
            End If
        End With
    Next MyWin

End Sub

This is never a problem when Excel (with a personal.xlsb) is already open and you're opening an online file. It only happens when you open Excel (with a personal.xlsb) indirectly by opening the online file. So looping through all application windows in this way is arguably not necessary. Since there's only one that isn't personal.xlsb, you could just find and toggle that one.

 

I haven't figured out how to make this work in the ThisWorkbook > Open event of personal.xlsb, so I've assigned it to QAT shortcut button and a keyboard shortcut. It happens every single time, so it's annoying enough to devote some real estate to the solution.

 

Hope it helps someone!