我需要创建一个具有以下结构的 xml 文件:
<term name="example 1">
<customAttributes>
<customAttributeValue customAttribute="xyz">
<customAttributeReferences>
<columnRef table="a" column="x"/>
<columnRef table="b" column="x"/>
<columnRef table="c" column="x"/>
</customAttributeReferences>
</customAttributeValue>
</term>
我只使用 excel 来创建文件,但我能够导出的唯一结构是:
<term name="example 1">
<customAttributes>
<customAttributeValue customAttribute="xyz">
<customAttributeReferences>
<columnRef table="a" column="x"/>
</customAttributeReferences>
</customAttributeValue>
</term>
<term name="example 1">
<customAttributes>
<customAttributeValue customAttribute="xyz">
<customAttributeReferences>
<columnRef table="b" column="x"/>
</customAttributeReferences>
</customAttributeValue>
</term>
<term name="example 1">
<customAttributes>
<customAttributeValue customAttribute="xyz">
<customAttributeReferences>
<columnRef table="c" column="x"/>
</customAttributeReferences>
</customAttributeValue>
</term>
我的表结构是这样的:
| terms | table | column |
| -------- | ----------| ------ |
| example 1 | a | x |
| example 1 | b | x |
| example 1 | c | x |
有人能帮我吗?如有必要,我可以使用 VBA。谢谢!