how to check if office document excel is readonly office.js addin -
i want know if there api/function can used detect if office document read-only. creating office add-in using office.js library. document shared other user in readonly mode. if use following property, shows readwrite document in readonly mode. following property not helping
var docmode = office.context.document.mode; // did not work, gives value of manifest file guess
i trying following thing, worked not sure if right approach. if file in 1 drive give url http://d.doc.onedrive..something this.
if (office.context.document.url.indexof("https://excel.officeapps.live.com") > -1) {// in read-only mode-this unique folder name file $("#container").show(); $("#readonlyarea").show(); } else { $("#mainarea").show();}
it question. since excel has interesting scratch mode, though excel in read mode. both users , add-ins still able write workbook. therefore api returns readwrite meaning add-in able write. current behavior design. however, these changes can't saved read files. aware gap , have added our backlog. raising issue.
thanks, sky
Comments
Post a Comment