Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xsl transformation to Excel
Message
From
01/05/2006 17:47:50
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
Xsl transformation to Excel
Miscellaneous
Thread ID:
01118212
Message ID:
01118212
Views:
44
In the following Xsl file, I have found that field values having 0.00 or 0 end up as String and not Number:
<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?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform