RE: [xsl] XSL/XML to Excel

Subject: RE: [xsl] XSL/XML to Excel
From: "Wilder, Bill FIIS" <Bill.Wilder.FIIS@xxxxxxx>
Date: Thu, 23 Jan 2003 09:13:29 -0500
Lee,

One way is to hack the content (e.g. '0000123 -- the leading single quote
tells Excel it is a string). Depending on who's consuming this stuff,
another way might be to output to XML-SS format (XML Spreadsheet Schema)
that Excel XP knows how to read and write (and I think Access XP as well).

XML-SS knows how to specify data types, such as the String and Number
versions of your data. Note that the content is the same in both cases --
the attributes make the difference -- which seems cleaner to me.

THIS WILL SHOW UP AS THE STRING "0000123":
<ss:Cell>
    <ss:Data ss:Type="String">0000123</ss:Data>
</ss:Cell>

THIS WILL SHOW UP AS THE NUMBER "123":
<ss:Cell>
    <ss:Data ss:Type="Number">0000123</ss:Data>
</ss:Cell>

XML-SS reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexcl2k2/h
tml/odc_xmlss.asp

HTH,
-Bill


- -----Original Message-----
From: Lee, Insoo [mailto:Insoo.Lee@xxxxxx]
Sent: Wednesday, January 22, 2003 11:39 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] XSL/XML to Excel


 Not sure if this is the appropriate newsgroup, but any help would be
appreciated.
 I'm using XSL to stylesheet XML and output it to html and excel and they
work great.
  Only thing is for excel, I noticed that it drops all leading zeroes by
default so that 

  <myTag>0000123</myTag> would show up 123 in excel cell in stead of 0000123

  Any trick I can use in XSL to show it correctly in excel?
  Thanks

 IL

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread