[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Working with Scientific Notation

Subject: Working with Scientific Notation
From: "Michael H. Semcheski" <mhs-list@xxxxxxxxx>
Date: Fri, 04 Oct 2002 12:12:35 -0400
scientific notation worksheets
Hello,

I was wondering if anyone knows of a good way to convert very small numbers represented in scientific notation to a standard decimal.

The situation is this: I converted a spreadsheet from MS Excel 2002 into an MS XML Spreadsheet (more on that later). I have an xsl file that can convert the spreadsheet into a more-attractive-than-the-MS-html-output html file. (And in total, there are too many files to do things worksheets that need to be converted to do this by hand). Many of the values that are formatted as percents in excel show up in scientifc notation (eg -9.1053999999999996E-2) in the xml output. When I try to format them with format-number(), they show up as NaN. (This is the MSXML DOMDocument 3.0, by the way). Now I think I've read that JDK 1.2 processors don't bite on this, but the MSXML does. This is a real pain, because the decimals really need to be rounded by format-number() for the output to look decent.

On the Excel 2002 save as XML Spreadsheet option, I have been impressed. The output is well organized, most of the formatting info shows up in the first three or four nodes of the element, and all the data is in Worksheet nodes under the element and after the formatting info. Not too bad. The trick in creating the stylesheet for this (which held me up for a while, and so I'm writing this so that it might turn up in a search by someone in the same situation) is that the default namespace is microsoft-com:office-spreadsheet (ss), and if you don't catch this reference in the document element, you would not know that to match the Workbook or Worksheet (or most of their children) you need to add ss:Workbook or ss:Worksheet or ss:Table etc.



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.