Source code

Download source archive ↓

src/openpyxl/worksheet/custom.py

1#Autogenerated schema
2from openpyxl.descriptors.serialisable import Serialisable
3from openpyxl.descriptors import (
4    String,
5    Sequence,
6)
7
8# can be done with a nested sequence
9
10
11class CustomProperty(Serialisable):
12
13    tagname = "customProperty"
14
15    name = String()
16
17    def __init__(self,
18                 name=None,
19                ):
20        self.name = name
21
22
23class CustomProperties(Serialisable):
24
25    tagname = "customProperties"
26
27    customPr = Sequence(expected_type=CustomProperty)
28
29    __elements__ = ('customPr',)
30
31    def __init__(self,
32                 customPr=(),
33                ):
34        self.customPr = customPr
35