Class WriteTableRows
- class ooodev.write.table.write_table_rows.WriteTableRows(owner, component)[source]
Bases:
WriteDocPropPartial
,WriteTablePropPartial
,TableRowsComp
[TextTableRow
],LoInstPropsPartial
Represents writer table rows.
- __delitem__(key)[source]
Removes the row 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) –
- __getitem__(key)[source]
Gets the form at the specified index.
This is short hand for
get_by_index()
- Parameters:
key (key, int) – The index of the row. When getting by index can be a negative value to get from the end.
- Returns:
The row with the specified index.
- Return type:
See also
get_by_index()
- __init__(owner, component)[source]
Constructor
- Parameters:
component (XTableRows) – UNO object that supports
com.sun.star.table.TableRows
interface.owner (WriteTable[Any]) –
- Return type:
None
- append_rows(count=1)[source]
Appends rows to the table.
- Parameters:
count (int, optional) – Number of rows to append. Defaults to
1
.- Return type:
None
- get_by_index(idx)[source]
Gets the row at the specified index.
- Parameters:
idx (int) – Index of row.
- Returns:
Row 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 rows at the specified index.
- Parameters:
idx (int) – Index to insert the rows. Idx can be a negative value insert from the end. A value of
-1
will insert at the end.count (int, optional) – Number of rows to insert. Defaults to
1
.
- Returns:
List of inserted rows.
- Return type:
list[WriteTableRow]
- remove_by_index(idx, count=1)[source]
Removes columns from the specified index.
- Parameters:
idx (int) – The index at which the column will be removed. Idx can be a negative value insert from the end. A value of
-1
will remove from the end.count (int, optional) – The number of columns to remove. Default is
1
.
- Return type:
None
- property component: com.sun.star.text.TableRows
TableRows Component
- Return type:
TableRows
- property office_doc: OfficeDocumentT
Office Document.
- Return type:
- property write_table: WriteTable[Any]
Write Document.
- Return type:
WriteTable
[Any
]