Forum Discussion

pererexxl's avatar
pererexxl
Copper Contributor
Jul 31, 2023

Prevent Edge from opening Office files

Hi everybody

 

I do not know if this hub is the proper place to report this problem, but I have been last hour “binging” where to and I think this one is the closest to my problem.

 

I am a web developer for my organization. Most of my organization’s computers are behind a proxy that does not allow then to go to internet, only to intranet.

 

I am developing a web application that needs to download an Excel xls template and every time I download this xls template, Edge tries to open it online instead of saving it locally. This is really a problem as computers cannot go internet (due to proxy) and eventually Edge is not allowed to load on-line Excel and the process fails.

 

Is there some way to prevent Edge from opening office files from html o Javascript? As web developer I cannot push any policy to my organization's computers and I need to force Edge to download this file. I really wouldn't like to to insert a “Don’t use Edge in this site. Use Chrome instead” banner in my web app.

 

Thank you. Regards

3 Replies

  • Miles's avatar
    Miles
    Copper Contributor

    Ran into a similar problem today while helping Dad with his website, where he wanted to make an .xls document downloadable without opening in Edge.


    I realize my use case is a little different than OP's, but since this is one of the first threads that showed up in Google, I wanted to provide a general workaround:


    Since there's an exception for POST request method:

    https://textslashplain.com/2020/02/26/can-i-in-the-new-edge/#:~:text=How%20does%20Edge%20render%20Office%20documents%20directly%20in%20the%20browser%3F 


    Simply use this workaround to have a "link" that uses POST instead of GET:

    https://stackoverflow.com/a/33880971/16118981 


    Again, somewhat different use case from OP, but just in case anyone else ran into my issue, this seems to work well. WordPress users can simply use the HTML block to implement this. Peace and God bless! ✌️

    • joashparker's avatar
      joashparker
      Copper Contributor

      Kelly_Y 
      Yep, this helped me.

      in edge go to settings > Downloads > turn off "Open Office files in the browser"

Resources