Importing XML with XSL into Excel fails

M

Madhukar

Hi,
I am trying to open following XML file ab.xml into Excel 2003/2007 which
gives following error

Required attribute '{http://www.w3.org/1999/XSL/Transform}version' is missing.

Am I missing anything? please help.

Following are the contents of ab.xml file which contains XSL to Transform
data into worksheets.

<?xml version="1.0"?>
<?xml-stylesheet version="1.0" href="#exportstyle" type="text/xsl"?>
<!DOCTYPE NewDataSet [
<!ATTLIST xsl:stylesheet
id ID #REQUIRED>
]>
<NewDataSet>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
id="exportstyle"
xmlns="urn:schemas-microsoft-com:eek:ffice:spreadsheet"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel"
xmlns:ss="urn:schemas-microsoft-com:eek:ffice:spreadsheet" >
<xsl:template match="xsl:stylesheet"/>
<xsl:template match="NewDataSet">
<Workbook xmlns="urn:schemas-microsoft-com:eek:ffice:spreadsheet"
xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel"
xmlns:ss="urn:schemas-microsoft-com:eek:ffice:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Worksheet>
<xsl:attribute name="ss:Name">Login</xsl:attribute>
<Table>
<xsl:apply-templates select="NewDataSet"/>
<Row>
<Cell>
<Data ss:Type="String">ContentKey</Data>
</Cell>
<Cell>
<Data ss:Type="String">LocalizedContent</Data>
</Cell>
</Row>
<xsl:for-each select="Login">
<Row>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="ContentKey"/>
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="LocalizedContent"/>
</Data>
</Cell>
</Row>
</xsl:for-each>
</Table>
</Worksheet>
</Workbook>
</xsl:template>
</xsl:stylesheet>
<Login>
<ContentKey>Database</ContentKey>
<LocalizedContent>Database**</LocalizedContent>
</Login>
<Login>
<ContentKey>HeaderText</ContentKey>
<LocalizedContent>CMT Login12</LocalizedContent>
</Login>
</NewDataSet>
 

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