berhoel.odf package¶
Give access to ods files.
-
class
berhoel.odf.
Odf
(path: Union[str, pathlib.Path])[source]¶ Bases:
berhoel.odf.OdfXml
Base class for OpenDocument Format files.
Methods
find
(tag)Find
tag
in this element.findall
(tag)Find all of
tag
.get
(attrib)Get atribute of this element, honors namespace.
-
class
berhoel.odf.
OdfXml
(elem: lxml.etree._Element)[source]¶ Bases:
object
Base XML handling class for ODF processing.
Methods
find
(tag)Find
tag
in this element.findall
(tag)Find all of
tag
.get
(attrib)Get atribute of this element, honors namespace.
-
find
(tag: str) → lxml.etree._Element[source]¶ Find
tag
in this element.- Parameters
tag (str) – XML tag to serarch for.
- Returns
Element acc. to
tag
.- Return type
etree._Element
-
Subpackages¶
Submodules¶
berhoel.odf._version module¶
berhoel.odf.ods module¶
Processing ods (OpenDocument spreadsheets).
-
class
berhoel.odf.ods.
Cell
(elem: lxml.etree._Element)[source]¶ Bases:
berhoel.odf.OdfXml
Representing a cell in a table row.
- Attributes
Methods
find
(tag)Find
tag
in this element.findall
(tag)Find all of
tag
.get
(attrib)Get atribute of this element, honors namespace.
-
property
date
¶ Return date value of cell if available.
- Returns
Date value of cell if available.
- Return type
-
property
float
¶ Return float value of cell.
- Returns
float
falue of cell if available.- Return type
-
property
link
¶ Provide Link information.
This link information is information of values referenced from diffrent tables in formula.
- Returns
Result of
re.match.groupdict
. Provided keys aresheet
,row
, andline.
- Return type
-
property
url
¶ Return URL associated with cell from hyperlink function.
- Returns
url from
HYPERLINK
formula or cell hyperlink.- Return type
-
class
berhoel.odf.ods.
Ods
(*args, **kw)[source]¶ Bases:
berhoel.odf.Odf
Processing ODS files.
Methods
find
(tag)Find
tag
in this element.findall
(tag)Find all of
tag
.get
(attrib)Get atribute of this element, honors namespace.
-
class
berhoel.odf.ods.
P
(elem: lxml.etree._Element)[source]¶ Bases:
berhoel.odf.OdfXml
Representing a paragraph in a cell.
- Attributes
text
Get text from paragraph.
Methods
find
(tag)Find
tag
in this element.findall
(tag)Find all of
tag
.get
(attrib)Get atribute of this element, honors namespace.
-
class
berhoel.odf.ods.
Row
(*args, **kw)[source]¶ Bases:
berhoel.odf.OdfXml
Representing table row.
Methods
find
(tag)Find
tag
in this element.findall
(tag)Find all of
tag
.get
(attrib)Get atribute of this element, honors namespace.
-
class
berhoel.odf.ods.
Table
(elem: lxml.etree._Element)[source]¶ Bases:
berhoel.odf.OdfXml
Representation of spreadsheet table.
- Attributes
hidden
Return whether table is hidden.
Methods
find
(tag)Find
tag
in this element.findall
(tag)Find all of
tag
.get
(attrib)Get atribute of this element, honors namespace.
Return whether table is hidden.
- Returns
True
if table is hidden.- Return type