<xsl:template match="/*/*/*"> <Cell> <xsl:if test='number(.)'> <Data ss:Type="Number"> <xsl:value-of select="."/> </Data> </xsl:if> <xsl:if test="not(number(.))"> <Data ss:Type="String"> <xsl:if test="(.) != 'NULL'"> <xsl:value-of select="."/> </xsl:if> </Data> </xsl:if> </Cell> </xsl:template>If my numeric fields have a value other than 0 than they are processed as number. Thus, they will be aligned right in the spreadsheet. But, why a value of 0 makes it processed as a String?