ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2016-04-11 21:03:04

Pega17
Member
Registered: 2016-04-11
Posts: 2

Change decimal separator

Hello.
I'm trying to load an excel file (.xslx) that have the digit "," as separator of decimals and not the digit ".".
I've searched the possibility to change the system separator, but i'm not able to find it.

Is there this possibility?
Can you help me?


Many thanks.

Offline

#2 2016-04-12 01:00:33

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Change decimal separator

Do you mean loading an Excel that has separator of decimals "," but you want to show it on screen with "." ?

What did you expect and what did you get?

Basically ReoGrid follows the .NET culture information that can be set by:

System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ru-RU");
// or
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");

Please try set it to the culture as the Excel file saved and put this code before loading Excel file.

Last edited by Jingwood (2016-04-12 10:57:11)

Offline

#3 2016-04-12 09:55:48

Pega17
Member
Registered: 2016-04-11
Posts: 2

Re: Change decimal separator

Hello.

I mean that i have an excel file with the decimal separator ',' and if i try to load it, the grid show me the numbers wrong.

e.g.
On file excel i have the number "10,5" that mean 10 and half units.
And after the load, on the worksheet, i see 105 or 10500 (i don't remember) but not the number that i'm expecting to see.

I think that the problem is the "decimal separator" that by default is set to ".", but in my case i've to use ",".

I will try to change the colture information and going back to you.

Many thanks.

Offline

Board footer

Powered by FluxBB