从 Office 加载项外部使用 Office.js API

Use Office.js APIs from outside an Office Add in

在 Office.js 文档中,阅读以下有关新的 ExecuteAsync() method/pattern 的内容:

"This also allows us to use the same APIs even outside of an Excel add- in. Imagine, for example, that you wanted to call Excel APIs against an > Excel workbook stored in OneDrive, but you wanted to do so from a stand-> alone web application, rather than one running inside Office 2016 for Windows or Office Online. This async model lends itself well to that capability."

然而,我无法找到任何关于如何在独立 Web 应用程序中实现此类功能的解释。有人知道怎么做吗?

这是指新的 Excel REST API。请在此处查看文档:http://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/excel

Excel 是迄今为止唯一支持 REST API 的 Office 主机,OneNote 的 REST API 除外,它独立于 Office.js 工作.