是的,这里的过程中,我看到它:
1)从您的Excel电子表格创建XML数据和架构文件。请参阅this reference.
2)将XML模式导入到客户端Excel电子表格中。请参见this reference.
3)将客户端Excel电子表格导出到XML数据文件。
4)在一举运行在两个文档的转换,基本上是:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common">
<xsl:variable name="mine" select="document(/path/to/your.xml)"/>
<xsl:variable name="client" select="document(/path/to/client.xml)"/>
<xsl:variable name="both">
<both>
<xsl:copy-of select="exsl:node-set($mine)/>
<xsl:copy-of select="exsl:node-set($client)/>
</both>
</xsl:variable>
<xsl:template match="exsl:node-set($both)/whatever>
<xsl:apply-templates/>
</xsl:template>
<!-- More templates here to do what you will with all the data,
whether it be copying, sorting first, or etc. -->
</xsl:stylesheet>
5)导入结果返回到您的Excel文档。
这是相当裸露的,我还没有这么做,所以一些特定的步骤可能在Excel中的版本颠簸之后发生了变化。最后一步需要在转换之外完成,因为XSLT是非破坏性的(不修改输入源文档,但只输出新的结果文档)
此外,它使用XSLT扩展功能exsl:node-set )。根据你所使用的工具,即IE浏览器,你可能需要将其切换到MSXSL扩展版本。
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
和
msxsl:node-set()
分别
。
惊喜G。谢谢。我迫不及待地尝试这个! – user1599325 2012-08-15 16:54:07