简体   繁体   English

为了支持body.insertOoxml OfficeJs API调用需要实现什么WOPI API

[英]What WOPI API needs to be implemented in order to support body.insertOoxml OfficeJs API call

I am developing a Word Online add-in that is supposed to operate in an environment with a custom WOPI host.我正在开发一个 Word Online 加载项,该加载项应该在具有自定义 WOPI 主机的环境中运行。 We faced issues with a certain Office JS API which appears not to be supported on the WOPI host side.我们遇到了某些 Office JS API 的问题,它似乎在 WOPI 主机端不受支持。 But we are struggling with identifying what exactly is missing.但我们正在努力确定究竟缺少什么。

Could anyone please help me to figure out what WOPI API needs to be implemented in order to support insertOoxml OfficeJs API call with insertLocation set to "Replace"?谁能帮我弄清楚需要实现什么WOPI API才能支持insertLocation设置为“替换”的insertOoxml OfficeJs API调用?

What the sequence of calls to the WOPI host would be in this case?在这种情况下,对 WOPI 主机的调用顺序是什么?

The code is pretty simple and works as expected with SharePoint as a WOPI Host.代码非常简单,可以使用 SharePoint 作为 WOPI 主机按预期工作。

Word.run(function (context) {
   var body = context.document.body;
   body.insertOoxml(ooxmlDoc, "Replace");
   return context.sync().then(function () {
   q.resolve();
 });
})

RichApi.Error 截图

Unfortunately, I have very limited access to the WOPI host codebase to understand the root cause.不幸的是,我对 WOPI 主机代码库的访问权限非常有限,无法了解根本原因。

Any ideas are highly appreciated!任何想法都受到高度赞赏!

Can you fetch the CheckFileInfo of your WOPI host?你能获取你的 WOPI 主机的CheckFileInfo吗?

You need to make a GET request to /wopi/files/(file_id) with the right access_token .您需要使用正确的access_token/wopi/files/(file_id)发出 GET 请求。 Then check the WOPI Capabilities , especially things like:然后检查WOPI Capabilities ,尤其是以下内容:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Visual Studio OfficeJS中使用打字稿进行示例Rest API调用 - Sample Rest API call using typescript in Visual studio OfficeJS 是否存在GetSelectedRangeS? Excel OfficeJS API - Does GetSelectedRangeS exist ? Excel OfficeJS API Outlook REST API 调用以 403 响应代码结束,当使用 ZE864E32CAB98 上的 OfficeJs 的回调令牌进行身份验证时 - Outlook REST API call ends with 403 response code when auth with callback token from OfficeJs on Android 从 OfficeJS 中使用外部 API - Consume external API from within OfficeJS 使用 officeJS 在加载项中显示通知 API - Show notification in add-in using officeJS API 是否可以使用OfficeJs API在Outlook中关闭邮件窗口? - Is it possible to close a message window in Outlook using the OfficeJs API? 如何使用OfficeJS API在MS Word中重新加载页眉和页脚 - How to reload header and footer in MS Word using officejs api Office dialog API Issue in Excel Desktop Version using OfficeJS - Office dialog API Issue in Excel Desktop Version using OfficeJS OfficeJs:Outlook外接程序:对话框API的messageParent不与OWA一起使用 - OfficeJs: Outlook Addin: Dialog API's messageParent not working with OWA `context.document.body.insertOoxml`打破了文档,崩溃了 - `context.document.body.insertOoxml` breaks documents, crashes word
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM