Search code examples
excelwindows-shortcut

How do I open an Excel spreadsheet in a separate instance without opening in Protected View?


I've come across an issue at work where I have a spreadsheet that needs to open in its own instance - it's a very complex modelling spreadsheet that does lots of processing using external DLL functions, so using other operational spreadsheets in the same instance is impractical.

I can open this spreadsheet directly from Explorer and it works fine, and I can create a shortcut directly to the spreadsheet and it works fine, but I can't open it in its own instance without a shortcut using the '/x' command line switch on the Excel.exe.

The problem is, when I have the shortcut directed to Excel.exe to open the spreadsheet, then Excel seems to think it's "downloading" the file and always opens in Protected View. Once it's opened in Protected View I can click "Enable Editing" but it then freaks out and breaks (I could describe how it freaks out and breaks but I'm confident there isn't a solution in down this avenue).

A workaround I have found is to go to Excel Protected View settings and disable Protected View for files originating from the internet. Why a shortcut to the Excel.exe loading the spreadsheet makes it treat it as a file from the internet I have no idea, but it works. The only problem with this solution is that it will now allow files actually downloaded from the internet to open without Protected View, which is far from ideal security-wise.

Does anyone know of a policy or setting that may impact this behaviour other than the setting I just mentioned?

Additional things I've tried:

  • Disabling other Protected View settings in Excel - no change.
  • Running the same command ("Excel.exe spreadsheet.xlsm /x") from Powershell or a .bat file - no change.
  • Having the spreadsheet and shortcut located from both network and local (C:) folders.
  • Googling - can't find anyone mentioning the same issue.

Running Office 365 x64.

Thanks in advance!


Solution

  • Alright so this is a little annoying, but I found the solution. By explicitly referencing the path of the spreadsheet in the shortcut 'Target', Excel will load it without going into Protected View. I don't know why it works that way and not the way I tried it, but that's the way it is.

    In summary, using a command like this does not work:

    "C:\Program Files\Microsoft Office\root\Office16\Excel.exe" /x Spreadsheet.xlsx

    even if the file is located in the same folder as the shortcut and the 'Start in' parameter of the shortcut is also the same folder.

    However, using a command like this does work:

    "C:\Program Files\Microsoft Office\root\Office16\Excel.exe" /x "C:\Users\Bob\Documents\Spreadsheet.xlsx"

    despite only seemingly cosmetic differences, because the spreadsheet path is explicitly referenced.

    Hopefully that helps someone else at some point as well