TX Sheet Control

SheetProtectionSettings Interface

Interface

Editing guard metadata; worksheet protection is not document encryption.

Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.

Type-only declaration; it is not a JavaScript runtime constructor.

Members

Properties

PropertyDescription
algorithmNameThe algorithmName value of SheetProtectionSettings.
allowDeleteColumnsThe allowDeleteColumns value of SheetProtectionSettings.
allowDeleteRowsThe allowDeleteRows value of SheetProtectionSettings.
allowEditObjectsThe allowEditObjects value of SheetProtectionSettings.
allowEditScenariosPreserved for native Excel scenario editing.
allowFilterThe allowFilter value of SheetProtectionSettings.
allowFormatCellsThe allowFormatCells value of SheetProtectionSettings.
allowFormatColumnsThe allowFormatColumns value of SheetProtectionSettings.
allowFormatRowsThe allowFormatRows value of SheetProtectionSettings.
allowInsertColumnsThe allowInsertColumns value of SheetProtectionSettings.
allowInsertHyperlinksThe allowInsertHyperlinks value of SheetProtectionSettings.
allowInsertRowsThe allowInsertRows value of SheetProtectionSettings.
allowSelectLockedCellsThe allowSelectLockedCells value of SheetProtectionSettings.
allowSelectUnlockedCellsThe allowSelectUnlockedCells value of SheetProtectionSettings.
allowSortThe allowSort value of SheetProtectionSettings.
allowUsePivotTablesPreserved for native Excel PivotTable operations.
hashValueThe hashValue value of SheetProtectionSettings.
isProtectedThe isProtected value of SheetProtectionSettings.
passwordHashThe passwordHash value of SheetProtectionSettings.
saltValueThe saltValue value of SheetProtectionSettings.
spinCountThe spinCount value of SheetProtectionSettings.

Examples

Create sample data and obtain this detached result from the owning document. Return the selected data to the report or application UI.

import type { Workbook } from '@txtextcontrol/tx-sheet-control';

function createSheetProtectionSettingsReport(book: Workbook) {
    const sheet = book.sheets.at(0);
    sheet.range('B8:B9').setValues([[120], [80]]);
    sheet.cell('B10').setFormula('=SUM(B8:B9)');
    sheet.range('B8:B10').format({ numberFormatCode: '#,##0.00', fontSize: 11 });
    sheet.protection.protect({ password: 'sample-edit-password' });

    const result = sheet.protection.settings;
    return result;
}

See Also