# XLS to XML transformation

**URL:** <https://forum.cloverdx.com/t/xls-to-xml-transformation/528>\
**Category:** CloverDX Platform\
**Created:** [May 28, 2009, 12:00am UTC](https://forum.cloverdx.com/t/xls-to-xml-transformation/528 "2009-05-28T00:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sean](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sean](https://forum.cloverdx.com/u/sean)\
**Post date:** [May 28, 2009, 12:00am UTC](https://forum.cloverdx.com/t/xls-to-xml-transformation/528/1 "2009-05-28T00:00:00Z")

</div>

Hi,

How do I create a graph to read an XLS file and write it to an XML file? Would it just be XLSDataReader → Partition → XMLWriter?

I have successfully read in the XLS file (i think) with 4 columns, say: $Col1:=#A;$Col2:=#B;$Col3:=#C;$Col4:=#D; How would I now write this to an XML?

How do I format the mapping of the XML if I wanted something like:

```auto

<SomeXML value="Col1">
    <Element constant="some string here" />
    <Property>
       <Value name="Name">Col2</Value>
       <Value name="Name2">Col4</Value>
    </Property>
    <AnotherElement name="Col3" />
</SomeXML>

```

---

<div class="post-metadata">

**Author:** ![avackova](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@avackova](https://forum.cloverdx.com/u/avackova)\
**Post date:** [May 29, 2009, 12:16pm UTC](https://forum.cloverdx.com/t/xls-to-xml-transformation/528/2 "2009-05-29T12:16:33Z")

</div>

Hello,  
if you don’t need to join data from different ports to your output file you can use StructureWriter. The graph is very easy: XLSDataReader → StructureWriter and you don’t need any complicated mapping:

```auto
<Node fileURL="${DATAOUT_DIR}/xml.out" id="STRUCTURE_WRITER0" mask="&lt;SomeXML value=&quot;$Col1&quot;&gt;&#10; &lt;Element constant=&quot;some string here&quot; /&gt;&#10; &lt;Property&gt;&#10; &lt;Value name=&quot;Name&quot;&gt;$Col2&lt;/Value&gt;&#10; &lt;Value name=&quot;Name2&quot;&gt;$Col4&lt;/Value&gt;&#10; &lt;/Property&gt;&#10; &lt;AnotherElement name=&quot;$Col3&quot; /&gt;&#10;&lt;/SomeXML&gt;&#10;" type="STRUCTURE_WRITER"/>

```

---

<div class="post-metadata">

**Author:** ![sean](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sean](https://forum.cloverdx.com/u/sean)\
**Post date:** [June 2, 2009, 5:02pm UTC](https://forum.cloverdx.com/t/xls-to-xml-transformation/528/3 "2009-06-02T17:02:20Z")

</div>

Thank you! This worked great
