ooodev.adapter.sheet.named_range_partial module

class ooodev.adapter.sheet.named_range_partial.NamedRangePartial(component, interface=com.sun.star.sheet.XNamedRange)[source]

Bases: NamedPartial

Partial Class for XNamedRange.

Parameters:
  • component (XNamedRange) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.sheet.XNamedRange)[source]

Constructor

Parameters:
  • component (XNamedRange) – UNO Component that implements com.sun.star.sheet.XNamedRange.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XNamedRange.

Return type:

None

get_content()[source]

Returns the content of the named range.

The content can be a reference to a cell or cell range or any formula expression.

Return type:

str

get_reference_position()[source]

Returns the position in the document which is used as a base for relative references in the content.

Returns:

The position in the document.

Return type:

CellAddress

Note

CellAddress can be imported from com.sun.star.table.

get_type()[source]

returns the type of the named range.

This is a combination of flags as defined in NamedRangeFlag.

Returns:

The type of the named range.

Return type:

NamedRangeFlagEnum

Note

NamedRangeFlagEnum is a flags enum and can be imported from ooo.dyn.sheet.named_range_flag.

set_content(content)[source]

sets the content of the named range.

The content can be a reference to a cell or cell range or any formula expression.

Return type:

None

Parameters:

content (str) –

set_reference_position(reference_position)[source]

Sets the position in the document which is used as a base for relative references in the content.

Parameters:

reference_position (CellAddress) – The position in the document.

Return type:

None

Note

CellAddress can be imported from com.sun.star.table.

set_type(type_enum)[source]

Sets the type of the named range.

Parameters:

type_enum (int | NamedRangeFlagEnum) – The type of the named range.

Return type:

None

Note

This is a combination of flags as defined in NamedRangeFlag.

NamedRangeFlagEnum is a flags enum and can be imported from ooo.dyn.sheet.named_range_flag.