Forum Discussion

mscrissy020102's avatar
mscrissy020102
Copper Contributor
Feb 04, 2019

How to lock an Excel file with javascript Excel API

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

  • Office_Addins's avatar
    Office_Addins
    Copper Contributor
    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

Resources