ooodev.format.calc.direct.cell.cell_protection package

Module contents

class ooodev.format.calc.direct.cell.cell_protection.CellProtection(hide_all=False, protected=False, hide_formula=False, hide_print=False)[source]

Bases: CellProtectionStruct

Cell Protection.

Warning

Cell protection is only effective after the sheet is has been applied to is also been protected.

New in version 0.9.0.

__init__(hide_all=False, protected=False, hide_formula=False, hide_print=False)[source]

Constructor

Parameters:
  • hide_all (bool, optional) – Specifies if all is hidden. Defaults to False.

  • protected (bool, optional) – Specifies protected value. Defaults to False.

  • hide_formula (bool, optional) – Specifies if the formula is hidden. Defaults to False.

  • hide_print (bool, optional) – Specifies if the cell are to be omitted during print. Defaults to False.

Return type:

None

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (object) – UNO object

Raises:

PropertyNotFoundError – If obj does not have required property

Returns:

CellProtectionStruct instance that represents obj CellProtection properties.

Return type:

CellProtectionStruct

classmethod from_uno_struct(value)[source]
classmethod from_uno_struct(value, **kwargs)
classmethod from_uno_struct(value, **kwargs)

Converts a CellProtection instance to a CellProtectionStruct.

Parameters:

value (CellProtection) – UNO CellProtection.

Returns:

CellProtectionStruct set with CellProtection properties.

Return type:

CellProtectionStruct