Skip to content

Add support for metadata.xml

snippet requested to merge topic/3.2/metadata-xml into branch/3.2

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. Some simple tests for metadata types are now running.
  • Split cm/vm out to their own custom cell type (treat it similar to ArrayFormula). I've seen samples of vm looking something like
            <c r="O9" s="3" vm="208">
                <f>CUBEVALUE("ThisWorkbookDataModel",$B$5,$C9,O$6,Slicer_Year)</f>
                <v>115</v>
            </c>

and cm like

            <c r="C1" cm="1">
                <f t="array" ref="C1:C6">_xlfn.UNIQUE(A1:A50)</f>
                <v>27</v>
            </c>

Note: This is !437 (closed) rebased to 3.2

Edited by snippet

Merge request reports