Forum Discussion

Jon Preston's avatar
Jon Preston
Copper Contributor
Apr 16, 2018

Links to Sharepoint Document in Excel Opens in Browser

Hi

 

We have several spreadsheets that have hyperlinks to documents in Sharepoint folders. Until recently, when the hyperlink is selected the document would open in the application. However, recently, more often than not the document is downloaded via the browser (Chrome). Sometimes the link behaves as expected and the document will open in its native application but will then revert back without intervention.

 

I have checked the Sharepoint and Office 365 settings and the default is to open documents in their native application and this works when the document is opened from explorer.

 

Thanks for any help you can give.

 

Regards

 

Jon

  • Just to crosscheck both these settings are selected as below right?

    Library > Library Settings > Advanced settings > Opening Documents in the Browser > Default open behavior for browser-enabled documents.

    Site Settings > Site Collection Administration > Site Collection Features > Open Documents in Client Applications by Default.

     

    Also make sure none of the addons are corrupted. Try to reinstall addons like NameCtrlClass and SharepointDocumentClass.

     

    If none of above work try to repair and reinstall office and let us know.

     

    • Jon Preston's avatar
      Jon Preston
      Copper Contributor

      Thank you very much for your reply and suggestions.

       

      I have done everything suggested. The  settings were already as required. However, opening the documents from the links in Excel still attempts to open them in the browser rather than with the native application.

       

      Is there anything else I can try?

      • domemsgroup's avatar
        domemsgroup
        Copper Contributor

        Hi Jon,

         

        Hi got to the bottom of this.. after many hours and then Microsoft support.

         

        You will need to customize the link in order for it to open in the local program.

         

        For instance, this link will open a document called Test.xlsx in a web browser:

        https://contoso.sharepoint.com/:x:/r/sites/Test/_layouts/15/Doc.aspx?sourcedoc=%7B5E9CC057-1F22-40A9-94AB-7BA39F505C6A%7D&file=Test.xlsx&action=default&mobileredirect=true

         

        However, if you browse to the document library, and then copy and customize the address and add the filename, you could make the link look like this:

        https://contoso.sharepoint.com/sites/Test/Shared%20Documents/Test.xlsx

        This document will now open in Excel the program rather the web browser.

         

        You will need to make sure their default web browser is logged into Office 365, and that the prompt to allow the document to open in the program is accepted and you can save the choice. It may still prompt to click ok in the future when clicking a link that defaults to open in the program.

         

        Also, you will need to make sure that in Library Settings for the site, and in Advanced Settings, that you have set the default open behavior for browser-enabled documents to open in the client application.

         

        If you want to avoid the user being prompted to open the Excel program when using the customized link, you can use Excel URI schemes to modify the custom link.

        This website contains information on URI schemes with MS Office applications.

         

        Office URI Schemes

        https://docs.microsoft.com/en-us/office/client-developer/office-uri-schemes

         

        You will need to use the customized link as mentioned already with the addition of the URI scheme to open the Excel program without prompting when using a link from within an office application, or if you want to create a regular link you can place on a users desktop or in my documents that links to the SharePoint file.

        To create a hyperlink that links to an Excel document in SharePoint online, and to open that document in Excel with editing enabled without being prompted, this would be the format:

         

        ms-excel:ofe|u|https://contoso.sharepoint.com/sites/Test/Shared%20Documents/Test.xlsx

         

        You would then need to right click on the cell and click Link and set it to be a hyper link with the address using the same exact text with the entire contents of the link included in the address.

         

        The URI schemes article describes how to setup links for Excel and other MS Office programs, and the options that are available to open the documents such as in view only or edit mode.

Resources