Excel Online在尝试使用开发租户进行自动显示和插件时添加-403

时间:2017-07-20 17:39:28

标签: excel office365 office-js

更新:似乎XML不是问题,而且问题与使用开发租户有关。据我所知,它使用Office 365 Home account表现正常,但在使用Office 365 Enterprise E3 Developer account时会抛出403。为什么这会抛出403?有什么我可以做的,所以我们可以测试我们是否可以使用我们的模板获得一个addin taskpane来自动显示?

标题编辑来自" Excel Online Add in- How to auto show taskpane"到" Excel Online Add in- 403 when trying to autoshow and addin using a dev tenant"

原始 我尝试按照本指南自动显示插件:https://dev.office.com/docs/add-ins/design/automatically-open-a-task-pane-with-a-document

由于我们目前在商店中使用的清单并未使用 <TaskpaneId>Office.AutoShowTaskpaneWithDocument</TaskpaneId>我试图使用Script Lab

进行测试

<we:webextension> xml位于

之下
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<we:webextension xmlns:we="http://schemas.microsoft.com/office/webextensions/webextension/2010/11"
          id="{8bc018e3-f345-40d4-8f1d-97951765d531}">
    <we:reference id="WA104380862" version="1.1.0.2" store="en-US" storeType="OMEX"/>
    <we:alternateReferences/>
    <we:properties>
        <we:property name="Office.AutoShowTaskpaneWithDocument" value="true"/>
    </we:properties>
    <we:bindings/>
    <we:snapshot xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"/>
</we:webextension>

<wetp:taskpane>我尝试设置visibility="1"visibility="0",但似乎都没有效果。当它是1时,我得到403,这是我的控制台

OsfRuntimeExcelWac.js:12 GET https://store.office.com/gatedserviceextension.aspx?=313351b2_2e0ee2d3_1500571610901&ui=en-US&rs=en-US&ad=US&fromAR=4 403 ()   
e5191e878673e5c7.js:1 Uncaught ReferenceError: $ is not defined
  at t.n (e5191e878673e5c7.js:1)
  at new t (e5191e878673e5c7.js:1)
  at e5191e878673e5c7.js:1
MicrosoftAjax.js:5 Refused to set unsafe header "Cookie"
HEAD https://store.office.com/gatedserviceextension.aspx?fromAR=3&corr=41fa9016-d510-90be-877b-25c612f780bb 403 ()
MicrosoftAjax.js:5 Request to /gatedserviceextension.aspx?fromAR=3&corr=41fa9016-d510-90be-877b-25c612f780bb came back with the status code:

当它为0时,控制台中没有任何异常,但没有任何反应。

我做错了什么?我只是误解了应该完成的任务吗?当visibility="1"看起来它正在尝试做某事时,却是不允许的。这只是意味着我无法自动加载脚本实验室吗?他们的表现表明我可以。

感谢任何帮助。我们正在考虑使用适当的<TaskpaneId>推送新版本的Manifest来测试它,但我们首先想要一个概念验证。

2 个答案:

答案 0 :(得分:2)

这确实是我们的代码的一个问题,正在进行修复。它仅针对企业客户在Office 365的某些变体中进行了重新编辑。一旦得到确认修复程序已完全推出,我就会更新我的答案。

答案 1 :(得分:0)

你是如何设置

<we:property name="Office.AutoShowTaskpaneWithDocument" value="true"/>
在webextension中

你直接修改了吗? 您可以尝试在脚本实验室中通过api设置它:

Office.context.document.settings.set("Office.AutoShowTaskpaneWithDocument", true);
Office.context.document.settings.saveAsync();