Skip to content

Instantly share code, notes, and snippets.

@scottdw
Created December 6, 2016 14:55
Show Gist options
  • Save scottdw/8361d9fab18e60ef185f95949a91b930 to your computer and use it in GitHub Desktop.
Save scottdw/8361d9fab18e60ef185f95949a91b930 to your computer and use it in GitHub Desktop.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<xsl:output method="text" encoding="utf-8" />
<xsl:strip-space elements="*"/>
<xsl:template match="ss:Row"><xsl:apply-templates select="ss:Cell" /><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="ss:Cell"><xsl:value-of select="ss:Data"/><xsl:if test="position() != last()">,</xsl:if></xsl:template>
<xsl:template match="/">
<xsl:apply-templates select="/ss:Workbook/ss:Worksheet/ss:Table/ss:Row[position() &gt;= 10]" />
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment