Search code examples
excelditaoxygenxml

How To change excel rows into oxygen dita column using xml script?


I have an xml script whose input is taken from an excel sheet and output goes into an dita oxygen file.we cannot modify the excel sheet and dita file .we can modify only the script.we have to modify the script so that rows of excel sheet get converted in columns of dita file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA IBM Reference//EN" "ibm-reference.dtd">

<reference id="
" xml:lang="en-us">

<title>
</title><shortdesc> </shortdesc><refbody>
<section><title>
</title>
<table><title>Resolved Issues</title>

<tgroup cols="5"><colspec colwidth="1*"/><colspec colwidth="1*"/><colspec colwidth="1*"/><colspec colwidth="1.3*"/><colspec colwidth="3*"/>
<thead><row><entry>Component</entry><entry>Found in Version</entry><entry>Tracking Number</entry><entry>Sales Force Number / Parature Number</entry><entry>Description</entry></row></thead>
<tbody>
<entry colname="col1">
<entry colname="col2">
<entry colname="col3">  
<entry colname="col4">  
<entry colname="col5">  
</tbody></tgroup></table>
</section>
</refbody>
</reference>

Solution

  • It might be easier to convert the excel into a csv file and then game your script generate the rows and entries from that.