Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Stop excel changing the value of numbers in european formt

Hi,

I'm generating an excel report using xml transformed by xslt into html
(but saved as a .xls file) that is sent out to a large number of my
business's clients, mainly in Europe.The specification for the report
is that numbers should be shown in European format (. for thousand
seperators and , for decimal point). All was fine until I noticed
that one column of figures had a value that was sometimes was 10 times
larger than it should have been. After investigating further it
appears that if the number is greater than 1 with at least 4 decimal
places, excel treats the decimal point as a thousands seperator and
moves it.

E.g the correct value was 2,2567, excel turned it into 22,567

The easiest way to reproduce is to create an html document that just
shows the value 1,2345 & then drag it into excel.

I know I can change the international settings and all will then work
but because this is being sent out to many external people I want to
ensure they all see the correct value. How can I force excel to show
the number I want correctly?

Thanks for any help,

Stickleback
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Stop excel changing the value of numbers in european formt

The easiest way (and I believe the right way) is to create the Excel file in
the format of the location you are creating the Excel file in...

So if your system uses comma as thousand separator and dot as decimal then
use that... when any one with European settings (. for thousand seperators
and , for decimal point) opens the workbook, Excel will display the correct
value with the correct format...

If you are sending in XML then your definition should indicate the number
format so that any one reading it can apply appropriate transformations...


" wrote:

Hi,

I'm generating an excel report using xml transformed by xslt into html
(but saved as a .xls file) that is sent out to a large number of my
business's clients, mainly in Europe.The specification for the report
is that numbers should be shown in European format (. for thousand
seperators and , for decimal point). All was fine until I noticed
that one column of figures had a value that was sometimes was 10 times
larger than it should have been. After investigating further it
appears that if the number is greater than 1 with at least 4 decimal
places, excel treats the decimal point as a thousands seperator and
moves it.

E.g the correct value was 2,2567, excel turned it into 22,567

The easiest way to reproduce is to create an html document that just
shows the value 1,2345 & then drag it into excel.

I know I can change the international settings and all will then work
but because this is being sent out to many external people I want to
ensure they all see the correct value. How can I force excel to show
the number I want correctly?

Thanks for any help,

Stickleback

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Stop excel changing the value of numbers in european formt

Thanks for the reply Sheeloo but unfortunately the people that have
requested this work always want the values shown in european format
regardless of how the actual user viewing the data has their excel set
up. So I suppose what I'm really asking for is 'is there a way of
flagging data in a html formatted file so that when it is opened by
excel it treats it as text (rather than a number) & displays the value
unaltered?' i.e. when opening a html document that contains

<HTML<HEAD<TITLEtest</TITLE</HEAD<BODY<table<tr<td1,3456</
td</tr</table</BODY</HTML

in Excel it shows 1,3456 rather than 13,456 regardless of the settings
in Excel.

Thanks,

Stickleback
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Stop excel changing the value of numbers in european formt

Thanks for the reply Sheeloo but unfortunately the people that have
requested this work always want the values shown in european format
regardless of how the actual user viewing the data has their excel set
up. So I suppose what I'm really asking for is 'is there a way of
flagging data in a html formatted file so that when it is opened by
excel it treats it as text (rather than a number) & displays the value
unaltered?' i.e. when opening a html document that contains

<HTML<HEAD<TITLEtest</TITLE</HEAD<BODY<table<tr<td1,3456</
td</tr</table</BODY</HTML

in Excel it shows 1,3456 rather than 13,456 regardless of the settings
in Excel.

Thanks,

Stickleback
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Stop excel changing the value of numbers in european formt

Just worked it out.

You need to include in the html the following style :-

<style
..xl24
{mso-style-parent:style0;
mso-number-format:"\@";
white-space:normal;}
</style

and then the data line should be changed to :-

<td class=xl241,3456</td

I hope that helps someone in the future.

Stickleback



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Stop excel changing the value of numbers in european formt

Just worked it out.

You need to include in the html the following style :-

<style
..xl24
{mso-style-parent:style0;
mso-number-format:"\@";
white-space:normal;}
</style

and then the data line should be changed to :-

<td class=xl241,3456</td

I hope that helps someone in the future.

Stickleback

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Stop excel changing the value of numbers in european formt

Just worked it out.

You need to include in the html the following style :-

<style
..xl24
{mso-style-parent:style0;
mso-number-format:"\@";
white-space:normal;}
</style

and then the data line should be changed to :-

<td class=xl241,3456</td

I hope that helps someone in the future.

Stickleback

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 225
Default Stop excel changing the value of numbers in european formt

Good that you got the solution...



" wrote:

Just worked it out.

You need to include in the html the following style :-

<style
..xl24
{mso-style-parent:style0;
mso-number-format:"\@";
white-space:normal;}
</style

and then the data line should be changed to :-

<td class=xl241,3456</td

I hope that helps someone in the future.

Stickleback


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop words in Excel changing to numbers when mailmerging to Word Excel changing words into no's in Word Excel Discussion (Misc queries) 0 March 20th 08 04:18 PM
Stop Excel from changing numbers to dates in CSV file Curt L. Excel Discussion (Misc queries) 2 June 7th 05 12:23 AM
How do I stop Excel from changing numbers into a date? Buckwildbill Excel Discussion (Misc queries) 1 March 7th 05 07:42 AM
How do I stop excel from changing single numbers like 1 into a de. Jendayii Excel Discussion (Misc queries) 1 January 5th 05 10:03 PM
How do I stop Excel from changing simple numbers to their 1/100th. Chris C Excel Discussion (Misc queries) 1 December 14th 04 07:14 PM


All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"