Reference🔗
berhoel.odf 🔗
Give access to ods files.
Modules:
-
ods–Processing ods (OpenDocument spreadsheets).
-
tests–Tests for
berhoelODF.
Classes:
-
Odf–Base class for OpenDocument Format files.
-
OdfXml–Base XML handling class for ODF processing.
Classes🔗
berhoel.odf.Odf 🔗
Base class for OpenDocument Format files.
Parameters:
Methods:
-
find–Find
tagin this element. -
findall–Find all of
tag. -
get–Get atribute of this element, honors namespace.
Source code in src/berhoel/odf/__init__.py
berhoel.odf.OdfXml 🔗
Base XML handling class for ODF processing.
Args: elem (etree._Element): XML Element
Methods:
-
find–Find
tagin this element. -
findall–Find all of
tag. -
get–Get atribute of this element, honors namespace.
Source code in src/berhoel/odf/__init__.py
berhoel.odf.ods 🔗
Processing ods (OpenDocument spreadsheets).
Classes:
-
Cell–Representing a cell in a table row.
-
Ods–Processing ODS files.
-
P–Representing a paragraph in a cell.
-
Row–Representing table row.
-
Table–Representation of spreadsheet table.
Classes🔗
berhoel.odf.ods.Cell 🔗
Representing a cell in a table row.
Args: elem (etree._Element): XML Element
Methods:
-
find–Find
tagin this element. -
findall–Find all of
tag. -
get–Get atribute of this element, honors namespace.
Attributes:
-
date(date | None) –Return date value of cell if available.
-
float(float | None) –Return float value of cell.
-
int(int | None) –Return integer value of cell.
-
link(dict[str, str] | None) –Provide Link information.
-
text(str | None) –Return text associated with cell.
-
url(str | None) –Return URL associated with cell from hyperlink function.
-
value(str | None) –Return value of cell.
Source code in src/berhoel/odf/__init__.py
Attributes🔗
date property 🔗
date: date | None
Return date value of cell if available.
Returns: datetime.date: Date value of cell if available.
float property 🔗
float: float | None
Return float value of cell.
Returns: float: float falue of cell if available.
int property 🔗
int: int | None
Return integer value of cell.
Returns: int: int value if cell if available.
link property 🔗
text property 🔗
text: str | None
Return text associated with cell.
Returns: str: Cell text if avaliable.
url property 🔗
url: str | None
Return URL associated with cell from hyperlink function.
Returns: str: url from HYPERLINK formula or cell hyperlink.
Functions🔗
find 🔗
Find tag in this element.
Parameters:
Returns: etree._Element: Element acc. to tag.
findall 🔗
Find all of tag.
Parameters:
Returns: list[etree._Element]: Element acc. to tag.
get 🔗
Get atribute of this element, honors namespace.
Parameters:
Returns: str: Attribute value.
berhoel.odf.ods.Ods 🔗
Processing ODS files.
Methods:
-
find–Find
tagin this element. -
findall–Find all of
tag. -
get–Get atribute of this element, honors namespace.
Attributes:
Source code in src/berhoel/odf/ods.py
Attributes🔗
tables cached property 🔗
Return all tables in spreadsheet.
Returns: List[Table]: Tables in OpenOffice spreadsheet.
Functions🔗
find 🔗
Find tag in this element.
Parameters:
Returns: etree._Element: Element acc. to tag.
findall 🔗
Find all of tag.
Parameters:
Returns: list[etree._Element]: Element acc. to tag.
get 🔗
Get atribute of this element, honors namespace.
Parameters:
Returns: str: Attribute value.
berhoel.odf.ods.P 🔗
Representing a paragraph in a cell.
Args: elem (etree._Element): XML Element
Methods:
-
find–Find
tagin this element. -
findall–Find all of
tag. -
get–Get atribute of this element, honors namespace.
Attributes:
Source code in src/berhoel/odf/__init__.py
Attributes🔗
text property 🔗
text: str | None
Get text from paragraph.
Returns: str: Whole paragraph text if available.
Functions🔗
find 🔗
Find tag in this element.
Parameters:
Returns: etree._Element: Element acc. to tag.
findall 🔗
Find all of tag.
Parameters:
Returns: list[etree._Element]: Element acc. to tag.
get 🔗
Get atribute of this element, honors namespace.
Parameters:
Returns: str: Attribute value.
berhoel.odf.ods.Row 🔗
Representing table row.
Methods:
-
find–Find
tagin this element. -
findall–Find all of
tag. -
get–Get atribute of this element, honors namespace.
Attributes:
Source code in src/berhoel/odf/ods.py
Attributes🔗
cells cached property 🔗
Provide list of cells in row.
Empty cells are replaced by None, as are cells covered by merged cells.
Returns: List[Cell]: The cells making up the current row.
Functions🔗
find 🔗
Find tag in this element.
Parameters:
Returns: etree._Element: Element acc. to tag.
findall 🔗
Find all of tag.
Parameters:
Returns: list[etree._Element]: Element acc. to tag.
get 🔗
Get atribute of this element, honors namespace.
Parameters:
Returns: str: Attribute value.
berhoel.odf.ods.Table 🔗
Representation of spreadsheet table.
Args: elem (etree._Element): XML Element
Methods:
-
find–Find
tagin this element. -
findall–Find all of
tag. -
get–Get atribute of this element, honors namespace.
Attributes:
-
hidden(bool) –Return whether table is hidden.
-
name(str) –Return name attriute of table.
-
rows(list[Row]) –Return rows in table.
-
style_name(str) –Return table style-name.
Source code in src/berhoel/odf/__init__.py
Attributes🔗
hidden property 🔗
hidden: bool
Return whether table is hidden.
Returns: bool: True if table is hidden.
rows cached property 🔗
Return rows in table.
Returns: List[Row]: list of Row intances.
style_name cached property 🔗
style_name: str
Return table style-name.
I Know of ta1 for ordinary tables, and ta2 for hidden tables.
Returns: str: style name of table.
Functions🔗
find 🔗
Find tag in this element.
Parameters:
Returns: etree._Element: Element acc. to tag.
findall 🔗
Find all of tag.
Parameters:
Returns: list[etree._Element]: Element acc. to tag.
get 🔗
Get atribute of this element, honors namespace.
Parameters:
Returns: str: Attribute value.