Workbook Protection停止使用Excel Online [英] Workbook Protection stopped working with Excel Online
本文介绍了Workbook Protection停止使用Excel Online的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Until a few weeks ago, the workbook protection API was working in Excel Online. Now it gives error as invalid parameter.
我正在设置allowInsertColumns: false
和allowFormatCells: false
.
我的代码如下:
Excel.run(function (ctx) {
var sheet = ctx.workbook.worksheets.getItem("Sheet1");
var range = sheet.getRange("A1:B3").format.protection.locked = false;
sheet.protection.protect({
allowInsertColumns: false,
allowFormatCells: false
});
$('#mytestlabel1').text("Execution of protect api call is complete");
return ctx.sync().then(function () {
$('#mytestlabel').text("Sync operation is complete");
});
}).catch(function (error) {
$('#mytestlabel').text(error.message);
console.log("Error: " + error);
if (error instanceof OfficeExtension.Error) {
console.log("Debug info: " + JSON.stringify(error.debugInfo));
}
});
ctx.sync
完成后出现异常
有人知道发生了什么变化以及如何解决此问题吗?
Does anybody know what has changed, and how to fix this?
推荐答案
产品团队已意识到此问题,并正在努力进行修复.
The product team is aware of this issue and is working on a fix.
请参见 https://github.com/OfficeDev/office-js- docs/issues/1185 了解详情.
这篇关于Workbook Protection停止使用Excel Online的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文