I have created this stylesheet for XML source. But when i open the excel sheet it displays the rows as colummns. what am i doing wrong. please help.
<?xml version="1.0" ?>
<ROWSET>
<ROW>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<FULL_NAME>Brookes, Allan</FULL_NAME>
<AMOUNT_LIMIT>200000</AMOUNT_LIMIT>
</ROW>
<ROW>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<FULL_NAME>Brookes, Allan</FULL_NAME>
<AMOUNT_LIMIT>50000</AMOUNT_LIMIT>
</ROW>
<ROW>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<FULL_NAME>Born, Martha</FULL_NAME>
<AMOUNT_LIMIT>25000</AMOUNT_LIMIT>
</ROW>
</ROWSET>
in the excel sheet it displays like this
ns1:Name Data ns1:Type
HR_Hierarchy_feed_to_CT_ (e-mail address removed) String
Hierarchy_feed_to_CT_ Brookes, Allan String
HR_Hierarchy_feed_to_CT_ 200000 Number
HR_Hierarchy_feed_to_CT_ (e-mail address removed) String
HR_Hierarchy_feed_to_CT_ Brookes, Allan String
HR_Hierarchy_feed_to_CT_ 50000 Number
HR_Hierarchy_feed_to_CT_ (e-mail address removed) String
HR_Hierarchy_feed_to_CT_ Born, Martha String
HR_Hierarchy_feed_to_CT_ 25000 Number
I want it like this
(e-mail address removed) Brookes, Allan 200000
(e-mail address removed) Brookes, Allan 50000
(e-mail address removed) Born, Martha 25000
XSL Stylesheet
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ss="urn:schemas-microsoft-comffice:spreadsheet"
xmlns="urn:schemas-microsoft-comfficeffice"
xmlns:x="urn:schemas-microsoft-comffice:excel">
<xsl:template match="/">
<Workbook>
<Worksheet ss:Name="HR_Hierarchy_feed_to_CT_">
<Table>
<xsl:for-each select="ROWSET/ROW">
<ROW>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="EMAIL_ADDRESS"/>
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="FULL_NAME"/>
</Data>
</Cell>
<Cell>
<Data ss:Type="Number">
<xsl:value-of select="AMOUNT_LIMIT"/>
</Data>
</Cell>
</ROW>
</xsl:for-each>
</Table>
</Worksheet>
</Workbook>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" ?>
<ROWSET>
<ROW>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<FULL_NAME>Brookes, Allan</FULL_NAME>
<AMOUNT_LIMIT>200000</AMOUNT_LIMIT>
</ROW>
<ROW>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<FULL_NAME>Brookes, Allan</FULL_NAME>
<AMOUNT_LIMIT>50000</AMOUNT_LIMIT>
</ROW>
<ROW>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<FULL_NAME>Born, Martha</FULL_NAME>
<AMOUNT_LIMIT>25000</AMOUNT_LIMIT>
</ROW>
</ROWSET>
in the excel sheet it displays like this
ns1:Name Data ns1:Type
HR_Hierarchy_feed_to_CT_ (e-mail address removed) String
Hierarchy_feed_to_CT_ Brookes, Allan String
HR_Hierarchy_feed_to_CT_ 200000 Number
HR_Hierarchy_feed_to_CT_ (e-mail address removed) String
HR_Hierarchy_feed_to_CT_ Brookes, Allan String
HR_Hierarchy_feed_to_CT_ 50000 Number
HR_Hierarchy_feed_to_CT_ (e-mail address removed) String
HR_Hierarchy_feed_to_CT_ Born, Martha String
HR_Hierarchy_feed_to_CT_ 25000 Number
I want it like this
(e-mail address removed) Brookes, Allan 200000
(e-mail address removed) Brookes, Allan 50000
(e-mail address removed) Born, Martha 25000
XSL Stylesheet
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ss="urn:schemas-microsoft-comffice:spreadsheet"
xmlns="urn:schemas-microsoft-comfficeffice"
xmlns:x="urn:schemas-microsoft-comffice:excel">
<xsl:template match="/">
<Workbook>
<Worksheet ss:Name="HR_Hierarchy_feed_to_CT_">
<Table>
<xsl:for-each select="ROWSET/ROW">
<ROW>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="EMAIL_ADDRESS"/>
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="FULL_NAME"/>
</Data>
</Cell>
<Cell>
<Data ss:Type="Number">
<xsl:value-of select="AMOUNT_LIMIT"/>
</Data>
</Cell>
</ROW>
</xsl:for-each>
</Table>
</Worksheet>
</Workbook>
</xsl:template>
</xsl:stylesheet>