WorksheetProtection protect(options: WorksheetProtectionOptions) 在 Excel Client 在 IPad IOS 和 Mac 中不工作
WorksheetProtection protect(options: WorksheetProtectionOptions) not working in Excel Client in IPad IOS and also in Mac
我正在尝试在 IOS
的 Excel 客户端中使用工作表保护的保护方法
如果我不在 protect 方法中使用选项参数,它可以正常工作,
https://github.com/OfficeDev/office-js-docs/blob/master/reference/excel/worksheetprotectionoptions.md#loadparam-object
但我需要将 allowFormatCells 选项设置为 true,此选项在 IOS IPad 的 Excel 客户端中无法正常工作 IPad, 我收到错误作为 InValid argument.
此方法在 Windows 环境中工作正常。
请告诉我如何解决这个问题。
function protectWorksheet() {
Excel.run(function (ctx) {
var sheet = ctx.workbook.worksheets.getItem("Sheet1");
var range = sheet.getRange("A1:B3").format.protection.locked = false;
//sheet.protection.protect({ allowInsertRows: true });
sheet.protection.protect({ allowFormatCells: true });
return ctx.sync();
}).catch(function (error) {
console.log("Error: " + error);
if (error instanceof OfficeExtension.Error) {
console.log("Debug info: " + JSON.stringify(error));
}
});
}
这听起来像是一个错误 -- 我们正在调查,一旦我们有更多信息就会更新线程。
我正在尝试在 IOS
的 Excel 客户端中使用工作表保护的保护方法如果我不在 protect 方法中使用选项参数,它可以正常工作, https://github.com/OfficeDev/office-js-docs/blob/master/reference/excel/worksheetprotectionoptions.md#loadparam-object
但我需要将 allowFormatCells 选项设置为 true,此选项在 IOS IPad 的 Excel 客户端中无法正常工作 IPad, 我收到错误作为 InValid argument.
此方法在 Windows 环境中工作正常。
请告诉我如何解决这个问题。
function protectWorksheet() {
Excel.run(function (ctx) {
var sheet = ctx.workbook.worksheets.getItem("Sheet1");
var range = sheet.getRange("A1:B3").format.protection.locked = false;
//sheet.protection.protect({ allowInsertRows: true });
sheet.protection.protect({ allowFormatCells: true });
return ctx.sync();
}).catch(function (error) {
console.log("Error: " + error);
if (error instanceof OfficeExtension.Error) {
console.log("Debug info: " + JSON.stringify(error));
}
});
}
这听起来像是一个错误 -- 我们正在调查,一旦我们有更多信息就会更新线程。