Help - Search - Members - Calendar
Full Version: help required to change format when converted from excel to xml.
MSFN Forums > Microsoft Software Products - Discussion & Support > Microsoft Office 97/2000/2002-XP/2003/2007

   
Google Internet Forums Unattended CD/DVD Guide
tdnithin
Hi Guys,

I am Using Microsoft office Excel 2003.

I am saving an excel file as xmlspreadsheet.

When I do this the values in column L of the excel spreadsheet is displayed in the xml spreadsheet in exponential form.

eg: 2.8525% in excel sheet is displayed in xml as

2.8524999999999998E-2



Could anyone please assist me in rectifying this: I need the value in the xml to be displaying in %age form.

e.g: 2.8524999999999998E-2 in xml should actually be displayed as 2.8525%.

style defined for this particular value in the xml as below.

<Style ss:ID="s109" ssarent="s24">

<Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>

<Borders/>

<Font x:Family="Swiss" ssize="7"/>

<Interior ss:Color="#FFFFFF" ssattern="Solid"/>

<NumberFormat ss:Format="0.0000000000%"/>

</Style>



Please help me to resolve this issue.

Looking forward for a quick response.



rgds

TD
IcemanND
here's what I end up with when I save an xml spreadsheet.

<Cell ss:StyleID="s62"><Data ss:Type="Number">2.8524999999999901E-2</Data></Cell>
jaclaz
I have NO experience with "saving" as XML.

But, I know a bit about Excel way to handle numbers. newwink.gif

It seems to me, unsure.gif that you are in a case when it is easy to fall in errors due to - let's call them confusion - between "precision" as opposed to "rounding" and "display" as opposed to "value".

If the 2.8524999999999998 value is coming from a formula like a division or a Square Root, say, JUST AS AN EXAMPLE:
CODE
=0.33/13

change it to:
CODE
=round(0.33/13,6)


or, alternatively, check in options, somewhere there should be a setting like "set precision as displayed" or something to that effect, before saving the spreadsheet as .xml.

jaclaz
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.