Javascript 从功能区双击以加载任务窗格会中断功能,从而阻止下次显示任务窗格
我已经使用创建了一个简单的JavaScript Excel加载项。 当我双击功能区按钮以显示外接程序的窗格时,将显示两个窗格。其中一个窗格可能无法工作。关闭窗格后,我无法再次显示任务窗格。只有重新加载网页才能修复问题 控制台可能包含以下错误:Javascript 从功能区双击以加载任务窗格会中断功能,从而阻止下次显示任务窗格,javascript,excel,office-js,office-addins,Javascript,Excel,Office Js,Office Addins,我已经使用创建了一个简单的JavaScript Excel加载项。 当我双击功能区按钮以显示外接程序的窗格时,将显示两个窗格。其中一个窗格可能无法工作。关闭窗格后,我无法再次显示任务窗格。只有重新加载网页才能修复问题 控制台可能包含以下错误: Access to XMLHttpRequest at 'https://euc-excel.officeapps.live.com/x/AppSettingsHandler.ashx?app=Excel' from origin 'https://ad
Access to XMLHttpRequest at
'https://euc-excel.officeapps.live.com/x/AppSettingsHandler.ashx?app=Excel'
from origin 'https://adxteam-my.sharepoint.com' has been blocked by
CORS policy: No 'Access-Control-Allow-Origin' header is present on the
requested resource. excel-boot.min.js:3 GET
https://euc-excel.officeapps.live.com/x/AppSettingsHandler.ashx?app=Excel
net::ERR_FAILED
该问题仅出现在联机Excel版本中
我相信很多用户都有双击按钮的坏习惯。因此,这个问题可能会造成麻烦
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>05c2e1c9-3e1d-406e-9a91-e9ac64854143</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Contoso Task Pane Add-in"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-80.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook"/>
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title"/>
<Description resid="GetStarted.Description"/>
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
</GetStarted>
<FunctionFile resid="Commands.Url" />
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label" />
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Label" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html" />
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
<bt:String id="CommandsGroup.Label" DefaultValue="Commands Group" />
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
05c2e1c9-3e1d-406e-9a91-e9ac64854143
1.0.0.0
康托索
恩美
新的名称
读写文件
按钮1
如果您可以共享清单,那就太好了,因此我可以对此问题进行本地复制。使用清单进行更新。我刚刚在Excel online和Win32上进行了一次尝试,但收到一条错误消息,清单无效。是否可以在您的服务器端侧加载清单?请将此清单用于服务器加载项。我曾尝试在Windows和Excel online上进行验证,但这两种平台都无法重新处理此问题。你的Excel版本是什么?