xslt transform xml data into to excel worksheet -- Urgent

W

Wilson Wu

hi,

how can i use xslt to transform xml data into excel worksheet ?

XML file :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test5.xsl"?>
<dataroot xmlns:blush:d="urn:schemas-microsoft-com:blush:fficedata">
<Employees>
<EmployeeID>1</EmployeeID>
</Employees>
<Others>
<Name2>test</Name2>
</Others>
</dataroot>

XSLT file :

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:blush:utput method="html"/>
<xsl:template match="/">
<TABLE>
<TR>
<TH>ID</TH>
</TR>
<xsl:apply-templates select="dataroot/Employees">
<xsl:sort select="LastName" order="ascending"/>
</xsl:apply-templates>
</TABLE>
</xsl:template>

<xsl:template match="dataroot/Employees">
<TR>
<TD>
<xsl:value-of select="ID" />
</TD>
</TR>
</xsl:template>


thanks
wilson
 
J

Justin Rogers

I think it's been said before, but the easiest format for Excel and Word
to understand is HTML. If you convert your XML into HTML, then
it should load up in Excel nicely.
 
W

Wilson Wu

Hi,

I found sample. But I cannot transform two worksheet ? Any help ?

Thanks
Wison
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top