本文介绍了我想使用Ewa API调用Ewa.js/EwaMoss.js脚本文件中的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处记录了Ewa命名空间:

The Ewa namespace is documented here:

https://msdn.microsoft.com/en-us/图书馆/办公室/ee589018.aspx

它非常易于使用,但是某些调用没有记录在案,也没有示例代码. Ewa.js的源代码在这里: https://s1-excel-15.cdn .office.net/x/sc/1662281009__layouts/App_Scripts/Ewa.js 但这是最小化的.

It's pretty easy to use, but certain calls are not documented and there's no sample code. The source for Ewa.js is here:https://s1-excel-15.cdn.office.net/x/sc/1662281009__layouts/App_Scripts/Ewa.jsBut it's minimized.

如果您查看源代码,则会看到有一个名为"InsertDeleteCells"的调用.如果您在此处放置一个断点,然后尝试在编辑模式下从电子表格中删除一行,则该断点将命中.

If you look at the source, you will see that there's a call named "InsertDeleteCells". If you put a breakpoint there, and then attempt to delete a row from the spreadsheet in edit mode, the breakpoint will hit.

有人知道怎么打那个电话吗?我假设起点是_Ewa和Ewa全局对象,并且我必须传递可以从Ewa.EwaControl

Does anyone know how to make that call? I'm assuming the starting point is the _Ewa and Ewa global objects, and that I would have to pass in the Session ID which I can get from the Ewa.EwaControl

或者,如果Microsoft的某人愿意提供Ewa.js和EwsMoss.js的非最小版本(可能称为Ewa.debug.js和EwaMoss.debug.js),则我可以完成其余的工作

Alternatively, if someone from Microsoft is willing to provide the non-minimized versions of Ewa.js and EwsMoss.js (probably called Ewa.debug.js and EwaMoss.debug.js), I can do the rest of the work.

推荐答案

我与Excel团队进行了核对.由Ewa.js调用的API完全是内部的,因此它们可能(并将)随时间变化.这就是为什么它们没有被记录的原因,以及为什么没有非缩小版本的原因.虽然您可以一起破解调用这些API的东西,但这种解决方案非常脆弱,容易被破坏,因此,我们真诚地建议您这样做.本质上,只有"Ewa"命名空间是公共的,而"_Ewa"之下的任何内容都是有意私有的.

I checked with the Excel team. The APIs called by Ewa.js are purely internal, so they may (and will) change over time. That is why they are not documented, and why there is not a non-minified version. While you may be able to hack something together that calls these APIs, such solution would be very fragile and susceptible to breaking, so it's not something we could, in good faith, recommend. Essentially, only the "Ewa" namespace is public, while anything under "_Ewa" is intentionally private.

希望这会有所帮助,

〜MSFT Office可扩展性团队的开发人员Michael Zlatkovsky

~ Michael Zlatkovsky, developer on Office Extensibility team, MSFT

这篇关于我想使用Ewa API调用Ewa.js/EwaMoss.js脚本文件中的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 01:33