Class ColObj

class ooodev.utils.data_type.col_obj.ColObj(value, cell_obj=None)[source]

Column info.

See also

New in version 0.8.2.

Parameters:
  • value (str) –

  • cell_obj (mCell.CellObj | None) –

__init__(value, cell_obj=None)
Parameters:
  • value (str) –

  • cell_obj (mCell.CellObj | None | None) –

Return type:

None

static from_int(num, zero_index=False)[source]

Gets a ColObj instance from an integer.

Parameters:
  • num (int) – Column number.

  • zero_index (bool, optional) – Determines if the column number is treated as zero index. Defaults to False.

Raises:

AssertionError – if unable to create ColObj instance.

Returns:

Cell Object

Return type:

ColObj

static from_str(name)[source]

Gets a ColObj instance from a string

Parameters:

name (str) – Column letter such as A or Cell Name such A1

Raises:

AssertionError – if unable to create ColObj instance.

Returns:

Column Object

Return type:

ColObj

cell_obj: mCell.CellObj | None = None

Cell Object that instance is part of

index: int

Column Index (zero-based)

property next: ColObj

Gets the next column

Return type:

ColObj

property prev: ColObj

Gets the previous column

Raises:

IndexError – If previous column is out of range

Return type:

ColObj

value: str

Column such as A