hi
i do have an xml file like this :
i made an xslt that transforms this xml into an office HTML file that is understandable by Excel.
Into Excel the strings that represent dates an numbers are recognized as string, not number or dates...
i found a way to recognize a number this way :
is this case i simply add a label in html tag : "x:num" :
Easy ! Excel even change the numeric separator depending on the regional setings GREAT.
Next Step : now i have to deal with dates... it's much more difficult (as you can see i can have different dates format : 07/17/2001 05:53:47 PM CEDT, 02/27/2002 03:01:20 PM CET)...
is there a way to recognize a date in a xsl code ? how can i specify it in office html so that excel recognize the date ?
Best regards,
Elise, XML learning girl X-)
i do have an xml file like this :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="C:\My Documents\excel.xsl"?>
<results>
<result>
<field name="ASSIGNED TO">dupont</field>
<field name="DTD_DONEDATE">02/27/2002 10:23:41 AM CET</field>
<field name="CREATEDATE">07/17/2001 05:53:47 PM CEDT</field>
<field name="DTD_DONETIME">0.15</field>
....
i made an xslt that transforms this xml into an office HTML file that is understandable by Excel.
Into Excel the strings that represent dates an numbers are recognized as string, not number or dates...
i found a way to recognize a number this way :
Code:
<xsl:if test = "string(number(.))!='NaN'">
is this case i simply add a label in html tag : "x:num" :
Code:
<td class="xl2" x:num><xsl:value-of select="."/></td>
Easy ! Excel even change the numeric separator depending on the regional setings GREAT.
Next Step : now i have to deal with dates... it's much more difficult (as you can see i can have different dates format : 07/17/2001 05:53:47 PM CEDT, 02/27/2002 03:01:20 PM CET)...
is there a way to recognize a date in a xsl code ? how can i specify it in office html so that excel recognize the date ?
Best regards,
Elise, XML learning girl X-)