0

on My PC I have English version (US) Excel 2013 I changed region to Germany, set value "550,66231278" to a cell in Excel When I read cell.Value2, I see in Visual Studio it is "550.66231278"

So I wonder if Value2 is always in US culture format or it is culture specific say, if I install Germany version of Excel, Value2 will be "550,66231278"?

Thanks

toosensitive
  • 2,335
  • 7
  • 46
  • 88
  • "I see in Visual Studio" - you mean in some app created with VS or in the debugger itself. Because the debugger usually uses neutral culture for floating point values like '1.123' . – Eugene Podskal Jun 24 '14 at 17:27
  • And if it is in some app, then are you sure that it(app) uses German Culture and UICulture? – Eugene Podskal Jun 24 '14 at 17:29
  • @Eugene, Yes, I created an app in VS and debug it in VS. So you mean this is b/c VS uses neutral culture? My visual studio is English (US) version. – toosensitive Jun 24 '14 at 17:34
  • I am not sure, but try to output this value in the app into some textBox or label. – Eugene Podskal Jun 24 '14 at 17:35

1 Answers1

0

MSDN says:

The only difference between this property and the Value property is that the Value2 property doesn’t use the Currency and Date data types. You can return values formatted with these data types as floating-point numbers by using the Double data type.

So the most probable is that your value is displayed in CultureNeutral fashion during the debugging or usage in the app. Try to change the culture and possibly UICulture in your app.

Community
  • 1
  • 1
Eugene Podskal
  • 10,270
  • 5
  • 31
  • 53