如何使用Excel javascript API设置工作表的自定义设置? [英] How to set custom settings for worksheet using Excel javascript API?

查看:119
本文介绍了如何使用Excel javascript API设置工作表的自定义设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以像这样在整个工作簿中设置设置:

I can set settings for whole workbook like here:

Office.context.document.settings.set("myKey", JSON.stringify(myValues));

除了特定的工作表之外,是否可以执行相同的操作?

Is there way to do the same but for specific worksheet ?

推荐答案

您应该获取

You should retrieve the Worksheet.id property and include it as part of each key you set.

(工作表名称也向API公开,但是用户可以更改它们,因此建议在此处使用id.)

(Worksheet names are also exposed to the API, but the user can change them, so id is recommended here.)

-Michael(Office加载项的PM)

-Michael (PM for Office add-ins)

这篇关于如何使用Excel javascript API设置工作表的自定义设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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