SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Variable WorkbookProtectionPanel

    WorkbookProtectionPanel: NamedExoticComponent<
        Props & RefAttributes<HTMLDivElement>,
    >

    Edits a workbook's two, genuinely different, protections in one place.

    Presentational — no model or IO access — so the layout stays testable on its own and the tab around it owns every write.

    The two halves are grouped together because a user thinking "protect this workbook" means either, and split visibly because they are not the same thing at all:

    • Encrypt rewrites the file so its contents are unreadable without the password.
    • Protect structure stores a hash the UI honours; the data stays fully readable to anything that opens the file.

    Excel separates these by storage mechanism (one is the container, one is XML in the package), which puts them in unrelated parts of its UI and reliably misleads people into thinking "Protect Workbook" encrypts. Grouping by intent and labelling by effect is the fix.

    Encryption has no switch of its own: it IS its password, so setting one encrypts and clearing it decrypts. Structure keeps its switch because it can be protected without a password.

    Nothing here has an Apply button, for the same reason the Sheet tab does not: every control is one unambiguous act, and a pane is not a dialog. Encryption still only reaches the FILE on the next save — but the intent is recorded the moment it is given, and an Apply button never changed that.