Skip to content

Draft: Add support for metadata.xml

snippet requested to merge topic/default/metadata-xml into branch/3.1

This merge aims to add support for the metadata.xml. I've implemented the data structures as per https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_Metadata_topic_ID0EYWT6.html

Currently it has basic round trip support (ie can be read in and written) but the additional namespaces and extLst contents are lost which causes file corruption when used with Dynamic Arrays (adding support for these would resolve #1898)

Example: input.xlsx test.py

If you modify the metadata.xml in the resulting output.xlsx generated from that script to include the full namespaces and extLst, it will load correctly with no corruption.

TODO:

  • Add Tests. Ideally I'd want to know if this implementation is heading in a good direction before writing them.
  • Split up metadata.py into smaller more manageable files. Chucking it all into one giant metadata.py file seems a bit much.

Merge request reports