如何使用Office-js Excel API的预览版? [英] How to use Preview version of office-js Excel API?

查看:51
本文介绍了如何使用Office-js Excel API的预览版?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用office-js Excel API的预览功能(特别是DataValidation).

I want to use Preview features of office-js Excel API (specifically DataValidation).

此页面说我应该使用该库的Beta版本,并且它们提供了链接,但我不知道该怎么做.

This page says that I should use Beta version of the library and they provide a link but I have no idea what to do with it.

到目前为止我做了什么:
我已将js路径添加到 index.html .
我将类型从ts文件复制到 node_modules 中的文件.

What I did so far:
I have added the js path to index.html.
I copied types from ts file to file in node_modules.

但这似乎不是一个好的解决方案,因为每当我更新 @ types/office-js 时,我也必须再次复制源代码...

But it doesn't seem like a good solution since whenever I update @types/office-js I would also have to copy source again...

推荐答案

要使用预览Api,您只需要:

in order to use preview Api you only need:

  1. 安装l 最快速的内部人员构建,并且
  2. 参考测试版CDN for office.js,如果要使用打字稿,请输入打字稿库:这是您需要使用的URL,正如Ricky建议的那样,请确保将这些引用添加到Web应用程序中的HTML或JS文件中.

https://appsforoffice.microsoft.com/lib/beta/hosted/office.js https://appsforoffice.microsoft.com/lib/beta/hosted/office.d.ts

这篇关于如何使用Office-js Excel API的预览版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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