Skip to content
REFERENCE

U.READ_ONLY

Summary

Converts the file access mode of the current workbook to read-only for all users except designated editors. Optionally returns the read-only state of the workbook

Syntax

=U.READ_ONLY([editors], [distribution_topic], [curr_version_num], [notify_of_update], [secret])

Parameters

Parameter Required Description
[editors] No The users for whom the method will not convert the workbook to read-only. Set to FALSE for method to return the read-only status of the workbook (TRUE if in read-only mode, FALSE if not). If set to FALSE and 2nd param also set to FALSE, workbook will be reverted from read-only mode to read-write mode
[distribution_topic] No The topic to which workbook updates will be published using U.DISTRIBUTE_WORKBOOK. The group name must end in WORKBOOK_CHANNEL; a default topic of /WORKBOOK_CHANNEL/ is used if not set. If set to FALSE and 1st param also set to FALSE, workbook will be reverted from read-only mode to read-write mode
[curr_version_num] No The current version number of the workbook represented as up to 4 integers delimited by periods (e.g.: 2.4.3)
[notify_of_update] No If set to TRUE then a message box alerting the user to a workbook update will be shown when a workbook update is received. If set to a positive number, then current version of workbook will be automatically closed after that many seconds unless already restarted.
[secret] No If provided, it will be used when subscribing to the distribution topic

Behavior

The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.

Return Value

Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.

Examples

=U.READ_ONLY(B5:B6)
=U.READ_ONLY(B20:B21,C25)

Notes

  • Formula examples are preserved from maintained workbook usage and normalized to the current U. prefix.
  • Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
  • Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
  • For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.