admin管理员组

文章数量:1122846

I am trying to use a MS Office URI which will automatically open Excel 2016. I am using a URI similar to:

ms-excel:ofe|u|<https://localhost:7068/getOfficeFile?fileName=2021_12_06_Metrics.xlsx>

I have also used:

ms-excel:ofe|u|<.xlsx>

I have created an endpoint in my application to fetch the document and stream it to excel.

It doesn't matter if I run it locally or hosted, when I put the URI into the browser, and hit enter, I get asked if I want to open excel. I say yes, but I always get the same result from Office:

To protect you from unsafe content, Office has blocked opening this file because it is coming from a site in the Restricted Sites zone.

I have tried adding mysite to the Trusted locations for Excel and also I've added it to Windows Internet Properties Trusted Sites. I have verified these are not in the Restricted Sites on Windows.

I can't seem to find anything else that would be blocking me from opening this excel file directly in Excel. I can download and open the file just fine, but I want the generated link to automatically open Excel.

Has anyone been able to locate some other Restricted Sites zone?

Has anyone been able to get this to work?

I am trying to use a MS Office URI which will automatically open Excel 2016. I am using a URI similar to:

ms-excel:ofe|u|<https://localhost:7068/getOfficeFile?fileName=2021_12_06_Metrics.xlsx>

I have also used:

ms-excel:ofe|u|<https://testsite.com/getOfficeFile?fileName=2021_12_06_Metrics.xlsx>

I have created an endpoint in my application to fetch the document and stream it to excel.

It doesn't matter if I run it locally or hosted, when I put the URI into the browser, and hit enter, I get asked if I want to open excel. I say yes, but I always get the same result from Office:

To protect you from unsafe content, Office has blocked opening this file because it is coming from a site in the Restricted Sites zone.

I have tried adding mysite.com to the Trusted locations for Excel and also I've added it to Windows Internet Properties Trusted Sites. I have verified these are not in the Restricted Sites on Windows.

I can't seem to find anything else that would be blocking me from opening this excel file directly in Excel. I can download and open the file just fine, but I want the generated link to automatically open Excel.

Has anyone been able to locate some other Restricted Sites zone?

Has anyone been able to get this to work?

Share Improve this question edited Nov 23, 2024 at 7:39 Ostoura 2,5232 gold badges27 silver badges45 bronze badges asked Nov 22, 2024 at 16:46 Ryan LaClaireRyan LaClaire 113 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Just trust the location like it says here : https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-trust-a-location

本文标签: excelOpening MS Office URI getting not allowed due to Restricted SiteStack Overflow