1
몇 주 전까지 workbook protection API이 Excel 온라인에서 작동했습니다. 이제 잘못된 매개 변수로 오류를 제공합니다.통합 문서 보호가 Excel 온라인에서 작동하지 않습니다.
allowInsertColumns: false
및 allowFormatCells: false
입니다.
내 코드는 다음과 같습니다 ctx.sync
이 완료되면
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));
}
});
내가 예외가
사람이 변경된 내용을 알고 있나요, 어떻게이 문제를 해결하려면?
한 번에 하나씩 설정하면 효과가 있습니까? –
아니요, 여전히 작동하지 않으며 github에 로그 된 결함입니다. https://github.com/OfficeDev/office-js-docs/issues/1185 –
명확히하기 위해 설정하려고하는 권한이 중요하지 않습니다. ? –