Return to Snippet

Revision: 5214
at February 19, 2008 20:22 by rengber


Initial Code
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" /> 
  <xsl:variable name="title" select="/Workbook/Worksheet/@Name"/>	
  <xsl:template match="/">
    <html><head><title>Leisure Timetable</title></head>
      <body>
        <h1><xsl:value-of select="$title"/></h1>
        <xsl:apply-templates select="Workbook/Worksheet"/>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="Worksheet">
    <xsl:apply-templates select="Table"/>
  </xsl:template> 

  <xsl:template match="Table">
    <table border="1">
      <xsl:apply-templates select="Row"/>
    </table>
  </xsl:template> 

  <xsl:template match="Row">
    <tr>
      <xsl:for-each select="Cell">
        <td><xsl:value-of select="." /></td>
      </xsl:for-each>
    </tr>
  </xsl:template> 

</xsl:stylesheet>

Initial URL


Initial Description


Initial Title
XSLT to Pull Data out of an Excel XML Spreadsheet

Initial Tags
xml, excel

Initial Language
XML