[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSL/XML to Excel
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/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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|