PHP Classes

File: xsl/cellList.xsl

Recommend this page to a friend!
  Classes of Karl Holz  >  PHP Convert Excel to JSON  >  xsl/cellList.xsl  >  Download  
File: xsl/cellList.xsl
Role: Auxiliary data
Content type: text/plain
Description: XSLT stylesheet, already embedded into class
Class: PHP Convert Excel to JSON
Convert data from Excel spreadsheet to JSON format
Author: By
Last change: Major Update

added cell mapping to names; index.php will display the excel files
sheets and data
Date: 11 months ago
Size: 891 bytes


Class file image Download
<?xml version="1.0" encoding="UTF-8"?>
 xmlns:xsl="" version="1.0">
 <xsl:output method="text" media-type="text/plain"/>
 <xsl:template match="/">[sheet]
dimension[]="<xsl:value-of select="substring-before(//dimension/@ref|//w:dimension/@ref,':')"/>"
dimension[]="<xsl:value-of select="substring-after(//dimension/@ref|//w:dimension/@ref,':')"/>"
<xsl:apply-templates select="//c|//w:c" /></xsl:template>
 <xsl:template match="//c|//w:c">
  <xsl:if test="v|w:v">
[<xsl:value-of select="@r"/>]
row="<xsl:value-of select="../@r"/>"
val="<xsl:value-of select="v|w:v"/>"
<xsl:if test="@t">t="<xsl:value-of select="@t"/>"</xsl:if>
For more information send a message to info at phpclasses dot org.