Reputation: 2470
I am trying to use the protect mehtod of Worksheet Protection in Excel client in IOS
its works fine if i dont use the option argument in protect method, https://github.com/OfficeDev/office-js-docs/blob/master/reference/excel/worksheetprotectionoptions.md#loadparam-object
but i need allowFormatCells option to be set to true, with this option its not working correctly in Excel client in IOS IPad, i get error as InValid argument.
This method works fine in Windows environment.
Please let me know how to workaround this.
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));
}
});
}
Upvotes: 0
Views: 359
Reputation: 8670
This sounds like a bug -- we are investigating, and will update the thread once we have more info.
Upvotes: 1