Class WriteTableColumns
- class ooodev.write.table.write_table_columns.WriteTableColumns(owner, component)[source]
Bases:
WriteDocPropPartial
,WriteTablePropPartial
,TableColumnsComp
,LoInstPropsPartial
Represents writer table columns.
- __delitem__(key)[source]
Removes the column at the specified index.
This is short hand for
remove_by_index()
- Parameters:
key (key, int) – The index of the cell. When getting by index can be a negative value to get from the end.
- Return type:
None
See also
remove_by_index()
- Return type:
None
- Parameters:
key (int) –
- __init__(owner, component)[source]
Constructor
- Parameters:
component (XTableColumns) – UNO object that supports
com.sun.star.text.TableColumns
service.owner (WriteTable) –
- Return type:
None
- append_columns(count=1)[source]
Appends columns to the table columns.
- Parameters:
count (int, optional) – The number of columns to append. Defaults to
1
.- Return type:
None
- get_by_index(idx)
Gets the element at the specified index.
- Parameters:
idx (int) – The Zero-based index of the element.
- Returns:
The element at the specified index.
- Return type:
Any
- get_count()
Gets the number of elements contained in the container.
- Returns:
The number of elements.
- Return type:
int
- get_element_type()
Gets the type of the elements contained in the container.
- Returns:
The type of the elements.
None
means that it is a multi-type container and you cannot determine the exact types with this interface.- Return type:
Any
- has_elements()
Determines whether the container has elements.
- Return type:
bool
- insert_by_index(idx, count=1)[source]
Inserts a new column at the specified index.
- Parameters:
idx (int) – The index at which the column will be inserted. A value of
-1
will append the column at the end.count (int, optional) – The number of columns to insert. Defaults to
1
.
- Return type:
None
- remove_by_index(idx, count=1)[source]
Removes columns from the specified idx.
- Parameters:
idx (int) – The index at which the column will be removed. A value of
-1
will remove the last column.count (int, optional) – The number of columns to remove. Defaults to
1
.
- Return type:
None
- property component: com.sun.star.text.TableColumns
Table columns Component
- Return type:
TableColumns
- property office_doc: OfficeDocumentT
Office Document.
- Return type:
- property write_table: WriteTable[Any]
Write Document.
- Return type:
WriteTable
[Any
]