Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Sets the locked property.

Component Version macOS Windows Linux Server iOS SDK
XL 3.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "XL.Format.SetLocked"; Book; Format; Value )   More


Parameter Description Example
Book The reference to the workbook. Please use XL.LoadBook to load a file. $ref
Format The index of the format in the book to target. 0
Value The new setting. $value


Returns OK or error.


Sets the locked property.
Needs to be used together with XL.Sheet.SetProtect or XL.Sheet.SetProtectEx function to prevent editing in locked cells.


Create locked format:

Set Variable [$textFormat; Value:MBS( "XL.Book.AddFormat"; $book)]
Set Variable [$r; Value:MBS( "XL.Format.SetLocked"; $book; $textFormat; 1) // locked ]

See also

This function checks for a license.

Created 18th August 2014, last changed 11st February 2020

XL.Format.SetIndent - XL.Format.SetNumFormat