从我的 manifest.xml
<bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://localhost:4000/excel-refresh" />
从我的函数文件
Office.context.ui.displayDialogAsync('https://localhost:4000/excel-dialog?action=loading', {height:50, width:50}, dialogCallback)
加载项不会在 Excel Online 本身中加载我的页面,而是提示我在新选项卡中打开它。单击“允许”后,我的 html 页面会在新选项卡中加载。我使用相同的主机和端口,所以这不应该发生。
根据OP问题下的评论,解决方案是将Options对象传递给displayDialogAsync
设置displayInIframe
为true的调用。例子:
displayDialogAsync("https://myDomain/myPage.html", {height:50, width:50, displayInIframe: true}, dialogCallback);
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句