Application.DecimalSeparator usage.

  • Thread starter Thread starter BrianB
  • Start date Start date
B

BrianB

I think this is the correct usage :-

x=Excel.XlApplicationInternational.xlDecimalSeparato
 
Hi, I'm dealing with the decimal and thousands separator issue.

I'm taking a number through a WebQuery and its format is "," as
Thousands separator and "." for Decimal Separator. I tried to do the
checking to change the format of this number according to the user
separators, but when I type ?Application.DecimalSeparator in the
Inmediate window, I get ",", but if I type a number in Excel, it's using
the ".".
How do I understand this?
Which one would be the best way to format a number according to the user
separators if it come as "123,456,789.012"?

Regards,
 
The 3 is the value of the constant - it has no relationship to which
separator is being used.
 
Beto said:
Hi, I'm dealing with the decimal and thousands separator issue.

I'm taking a number through a WebQuery and its format is "," as
Thousands separator and "." for Decimal Separator. I tried to do the
checking to change the format of this number according to the user
separators, but when I type ?Application.DecimalSeparator in the
Inmediate window, I get ",", but if I type a number in Excel, it's using
the ".".
How do I understand this?
Which one would be the best way to format a number according to the user
separators if it come as "123,456,789.012"?

On a side note, Application.International(xlDecimalSeparator) seems to
be returning the actual separator used in Excel. Any problems using this
command to recognize this? Is it available in all versions?

Regards,
 
BrianB said:
I think this is the correct usage :-

x=Excel.XlApplicationInternational.xlDecimalSeparator

Why is that?
From the inmediate window:

? Application.International(xlDecimalSeparator)
..
? Excel.XlApplicationInternational.xlDecimalSeparator
3

Wouldn't a "." be easier to use (and read the code) than a 3?

Regards,
 
Back
Top