'Office Protocol Handlers

Microsoft Office registers several protocol handlers such as ms-word, ms-excel, etc. Limited documentation is available here. I am attempting to use the Excel protocol handler to open a document passing it a file uri and not having much luck. I can make the operation work with an http/https uri without issue, however in my case the document resides on a network file share.

This works if the document is on a web server:
ms-excel:ofv|u|http://someserver/somefolder/document.xlsx

This does not work:
ms-excel:ofv|u|file://someserver/somefolder/document.xlsx

I receive the following error:

The action couldn't be performed because Office doesn't recognize the command it was given.

Is there any way to make these protocol handlers work with a file URI?



Solution 1:[1]

As mentioned here it could be issue of access rights. Have you tried to access the file via File Explorer?

In my case, I could not open the file until I first accessed the folder manually. File Explorer required me to enter credentials. After I entered them and retried the link, it worked.

Solution 2:[2]

I've been running into the same problem. Using the Office 2016 or 365 appears to work. 2013 or earlier doesn't.

The way around it is to define your own protocol handler and write a simple program to open the file (start myfile.xlsx). Messy, but I don't think it can be solved any other way without upgrading office.

Solution 3:[3]

try ms-excel:ofv|u|file://(Your IP Address or any address)/somefolder/document.xlsx

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 chriemmy
Solution 2 Cruachan
Solution 3 yasarui