How to lock an Excel file with javascript Excel API

Copper Contributor

How can I lock an Excel file with JavaScript Excel API? Is it possible? (read-only).

I use Excel 2013. 

 

Thank you, 

Crissy

1 Reply
This is not possible in Excel 2013.

Excel API 1.8 includes a property for checking if a workbook is open in read-only mode.
Only available to Office 365 subscription users.
https://docs.microsoft.com/en-us/javascript/api/excel/excel.workbook?view=excel-js-preview#readOnly

Excel API 1.1 includes a method for saving a workbook as read-only.
Excel 2016 and Excel Online

https://bettersolutions.com/javascript/excel-api/releases.htm