ooodev.format.inner.partial.calc.cell_protection.cell_protection_partial module

class ooodev.format.inner.partial.calc.cell_protection.cell_protection_partial.CellProtectionPartial(component)[source]

Bases: object

Partial class for Cell Protection.

Parameters:

component (Any) –

__init__(component)[source]
Parameters:

component (Any) –

Return type:

None

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

Style cell protection.

AArgs:

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.

Raises:

CancelEventError – If the event before_style_cell_protection is cancelled and not handled.

Returns:

Attribute Options Style instance or None if cancelled.

Return type:

CellProtection | None

Parameters:
  • hide_all (bool) –

  • protected (bool) –

  • hide_formula (bool) –

  • hide_print (bool) –

Hint

PlacementKind, SeparatorKind and CellProtection can be imported from ooodev.format.inner.direct.chart2.series.data_labels.data_labels.attrib_options

style_protection_get()[source]

Gets the cell protection Style.

Raises:

CancelEventError – If the event before_style_cell_protection_get is cancelled and not handled.

Returns:

Number percent style or None if cancelled.

Return type:

PercentFormat | None