On 15 Nov 2021, at 20:01, udif wrote:
I began a new codebase from the current 3.1 head.
OK.
I'm having an issue with the CellRichText class we discussed.
I'm trying to use the Serializable - derived classes, but the Sequence -
based classes require all members to be of the same type.
Actually, expected_type
should accept a tuple of types but I don't think I've used it yet. There are some parts of the schema that just don't map nicely.
In my case, CellRichText should have both str elements and TextBlock
elements.
I wouldn't use anything based on Serialisable for this: that is for parsing and serialising only and works most of time. Just write a Python class with a nice client-facing API as discussed, and then we can add the necessary code to convert the OOXML objects to this and then the other way round and takes the XML structure and strictures out of the picture.
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Waldlehne 23
Düsseldorf
D- 40489
Tel: +49-203-3925-0390
Mobile: +49-178-782-6226