【发布时间】:2014-01-21 16:34:29
【问题描述】:
如何为从 XML 文件到 Excel 2010 文件或 Word 2010 的 XSLT 转换创建模板?
这是我们在 Execel 2003 中的转换模板。但现在我需要它来 2010 年吗? 感谢您的帮助!
<xsl:stylesheet xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xslex="urn:XsltExtension"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:x="urn:schemas-microsoft-com:office:excel"
version="2.0">
<xsl:output method="xml" indent="yes" />
<xsl:output method="xml" version="1.0"/>
<xsl:template match="/NewDataSet">
<xsl:variable name="elements" select="xs:schema/xs:element/xs:complexType/xs:choice/xs:element/xs:complexType/xs:sequence/*" />
<xsl:variable name="columnAppearances" select="ColumnAppearances/*" />
<xsl:processing-instruction name="mso-application">
<xsl:text>progid="Excel.Sheet"</xsl:text>
</xsl:processing-instruction>
<Workbook>
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office" />
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
</xsl:styleshee>
【问题讨论】:
-
你说得对,我看到了,但 Excel 2010 需要它,不幸的是它不一样