Office-JS:Excel主机API在Excel 2016 MSO下不再可用 [英] Office-JS: Excel Host API no longer available under Excel 2016 MSO

查看:182
本文介绍了Office-JS:Excel主机API在Excel 2016 MSO下不再可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在运行带有Microsoft Excel 2016 MSO(16.04266.1001)64位的Windows 10.我觉得这是通过MSI安装的版本.

I'm currently running Windows 10 with Microsoft Excel 2016 MSO (16.04266.1001) 64-bit. I'm under the impression that that is the version installed via MSI.

在过去的几个月中,我已经使用Excel Host API实现了一个基于React的Excel加载项.根据 Excel JavaScript API要求 Office开发中心提供的文档,该文档似乎包含"ExcelApi 1.1,WordApi 1.1和通用API"需求集.

Over the course of the last few months I've implemented a React-based Excel add-in using the Excel Host APIs. Per the Excel JavaScript API requirement sets document available at the Office Dev Center, that build appears to contain the "ExcelApi 1.1, WordApi 1.1, and common API" requirement sets.

从昨天开始,我不再能够通过JavaScript或F12开发人员工具(window.Excel === undefined)访问Excel主机API.似乎该命名空间下以前存在的所有功能都变得不可用.

As of yesterday, I am no longer able to access the Excel host APIs through JavaScript or through the F12 developer tools (window.Excel === undefined). It appears that all the functionality under that had previously existed under that namespace has become unavailable.

似乎(除其他脚本外),从CDN加载的office.js脚本现在请求并嵌入

It appears that (among other scripts), the office.js script loaded from the CDN now requests and embeds Excel-15.02.js for the add-in.

我不知道昨天之前嵌入的Excel-*.js版本,但是仔细阅读CDN上Excel-15.02.jsExcel-winrt-16.00.js和其他版本的内容之后,我怀疑它是15.02以后的版本.

I do not know the version of Excel-*.js that was being embedded before yesterday, but after perusing the contents of both Excel-15.02.js, Excel-winrt-16.00.js and other versions available on the CDN, I suspect that it was a later version than 15.02.

为记录起见,以下两个运行时检查均返回false-我都说了,因为

For the record, both of the following runtime checks return false - I say both, because "API" is capitalized inconsistently in the documentation available at dev.office.com.

Office.context.requirements.isSetSupported("ExcelApi", 1.1); // false
Office.context.requirements.isSetSupported("ExcelAPI", 1.1); // false

请告知;最好的问候.

推荐答案

我正在调查此问题.一些问题:

I am investigating the issue. A few questions:

  1. 您提到正在加载的文件包括Excel-15 * .js文件.您如何看待-是通过Fiddler还是通过调试器?如果您可以发送Fiddler跟踪,那将非常有用(Fiddler跟踪可能包含一些敏感信息,因此您可能希望对其进行清理-随时将其直接发送给我,而不是在线将其发布在这里)
  2. 如果您浏览到 https://appsforoffice.microsoft.com/lib /1/hosted/office.js 在浏览器中,您在文件顶部看到的版本号是什么?
  3. 如果您愿意删除IE缓存:即使清除缓存后,您是否还能继续查看问题?
  1. You mention that the files being loaded include Excel-15*.js files. How are you seeing this -- is it through Fiddler, or through a debugger? If you can send a Fiddler trace, that would be really useful (a Fiddler trace may contain some sensitive info, so you may want to scrub it -- and feel free to send it to me directly rather than posting it here online)
  2. If you browse to https://appsforoffice.microsoft.com/lib/1/hosted/office.js in a browser, what is the version number that you see at the top of the file?
  3. If you are comfortable deleting your IE cache: could you see if the issue continues to repro even after you've cleared the cache?

请随时在此处通过评论回复,或者作为对您问题的更新,或者直接给我发送电子邮件.我的电子邮件是我在microsoft.com上的全名(用姓和名之间的点分隔).

Feel free to reply here via comments, or as updates to your questions, or to email me directly. My email is my full name (separated by a dot between first and last) at microsoft.com.

我将在有更多信息的情况下更新此答案.

I will be updating this answer as I have more info.

这篇关于Office-JS:Excel主机API在Excel 2016 MSO下不再可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆