Excel is changing the an xlst string value to a number upon opening
Posted on 2006-04-27
I have a datagrid that has a column which is a string identity field that is 19 characters long - all the characters values are numeric. I'm exporting and opening the datagrid in Excel using a xslt file. Excel changes the values from string to numeric and the result is a number who's last character is incorrect and and displays in scientific notation. Also, I can't prepend the value with an apostrophe. I need to be able to change my xslt line below so that Excel knows to leave it as a string.
Datagrid Column Value: 4003000000009010001
What I see in the resulting worksheet in Excel: 4.003E+18
What i see in the data field at the top: 4003000000009010000
The line in the xslt file
<xsl:value-of select="IDNUMBER" />
How can I tell Excel not to convert this data?