Discussion:
How do I make a mail merged numbers print decimals to 2 places?
(too old to reply)
Brig_view
2006-03-09 05:19:26 UTC
Permalink
I have an excel file used in a mail merge, the file has been formatted as
numbers to 2 decimal places eg. 10.01, 10.03. When I use this file in the
mail merge I get 10.03 represented as 10.0299999. How do I make word
represent the numbers I have in the excel file?
Brig_view
2006-03-09 05:52:27 UTC
Permalink
Thanks the solution was posted on this site. You have to format the field in
word by toggling between the fields and adding \#00.00. Why does excel
represent the number correctly and word does not until it's formatted?
Post by Brig_view
I have an excel file used in a mail merge, the file has been formatted as
numbers to 2 decimal places eg. 10.01, 10.03. When I use this file in the
mail merge I get 10.03 represented as 10.0299999. How do I make word
represent the numbers I have in the excel file?
Graham Mayor
2006-03-09 07:32:23 UTC
Permalink
Word reads only the underlying raw data and not the formatted data - see
http://www.gmayor.com/formatting_word_fields.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Post by Brig_view
Thanks the solution was posted on this site. You have to format the
field in word by toggling between the fields and adding \#00.00. Why
does excel represent the number correctly and word does not until
it's formatted?
Post by Brig_view
I have an excel file used in a mail merge, the file has been
formatted as numbers to 2 decimal places eg. 10.01, 10.03. When I
use this file in the mail merge I get 10.03 represented as
10.0299999. How do I make word represent the numbers I have in the
excel file?
Peter Jamieson
2006-03-09 09:44:57 UTC
Permalink
Post by Brig_view
Why does excel
represent the number correctly and word does not until it's formatted?
"Why" is always a difficult question to answer, particularly when you are
not the author of the software concerned. But...

You have almost answered your own question:
a. Excel stores the nmber internally using a floating point
representation which is not necessarily exactly what you typed in
b. Excel either applies default cell formats or one you explicitly apply
yourself, correcting the problem
c. when Word connects to Excel to get the data using OLEDB (the default
mechanism in Word 2002/2003) it retrieves the stored number, not the
displayed number, and nor does it retrieve the display format information.
d. Word has no knowledge of how you want to display the number so outputs
its version of the internal representation.

In my view, ideally OLEDB, or whatever mechanism MS standardised on for
internal Office data communications, would let you retrieve either the
internal representation, or the displayed values, or both, but it doesn't.
And you could well ask "Why?" about that, too...

You can revert to the DDE connection method (check
Word|Tools|Options|General|"Confirm conversions at open", go through the
connection process again, and select DDE when offered), which will typically
retrieve the display version of the data, but it does have its own problems
and limitations.

I suspect that MS would have a chance to do this stuff better if it put a
bit more effort into ensuring that intra-Office data communications could
all be XML-based and used a very standard set of data types and information
about representation.

Just my 2c worth...

Peter Jamieson
Post by Brig_view
Thanks the solution was posted on this site. You have to format the field in
word by toggling between the fields and adding \#00.00. Why does excel
represent the number correctly and word does not until it's formatted?
Post by Brig_view
I have an excel file used in a mail merge, the file has been formatted as
numbers to 2 decimal places eg. 10.01, 10.03. When I use this file in the
mail merge I get 10.03 represented as 10.0299999. How do I make word
represent the numbers I have in the excel file?
STS
2009-09-25 17:06:04 UTC
Permalink
How do you "toggle between fields"?
Post by Brig_view
Thanks the solution was posted on this site. You have to format the field in
word by toggling between the fields and adding \#00.00. Why does excel
represent the number correctly and word does not until it's formatted?
Post by Brig_view
I have an excel file used in a mail merge, the file has been formatted as
numbers to 2 decimal places eg. 10.01, 10.03. When I use this file in the
mail merge I get 10.03 represented as 10.0299999. How do I make word
represent the numbers I have in the excel file?
Peter Jamieson
2009-09-25 17:12:57 UTC
Permalink
In Windows versions of Word you generally use Alt-F9

This toggles between the "results" view, which might look like
<<myfield>> or an actual piece of data from the data source, and "code"
vew, which might look like

{ MERGEFIELD myfield }

Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv
Post by STS
How do you "toggle between fields"?
Post by Brig_view
Thanks the solution was posted on this site. You have to format the field in
word by toggling between the fields and adding \#00.00. Why does excel
represent the number correctly and word does not until it's formatted?
Post by Brig_view
I have an excel file used in a mail merge, the file has been formatted as
numbers to 2 decimal places eg. 10.01, 10.03. When I use this file in the
mail merge I get 10.03 represented as 10.0299999. How do I make word
represent the numbers I have in the excel file?
STS
2009-09-25 18:21:02 UTC
Permalink
Thanks! That information will be useful in a number of different
applications, not only the number formatting.
Post by Peter Jamieson
In Windows versions of Word you generally use Alt-F9
This toggles between the "results" view, which might look like
<<myfield>> or an actual piece of data from the data source, and "code"
vew, which might look like
{ MERGEFIELD myfield }
Peter Jamieson
http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv
Post by STS
How do you "toggle between fields"?
Post by Brig_view
Thanks the solution was posted on this site. You have to format the field in
word by toggling between the fields and adding \#00.00. Why does excel
represent the number correctly and word does not until it's formatted?
Post by Brig_view
I have an excel file used in a mail merge, the file has been formatted as
numbers to 2 decimal places eg. 10.01, 10.03. When I use this file in the
mail merge I get 10.03 represented as 10.0299999. How do I make word
represent the numbers I have in the excel file?
Loading...