Hi there,
Is there any way of setting a NumberFormat, using the format strings supported by different locales?
For example, the decimal separator is '.' for US locales, whereas it is ',' for Italian ones. So, the italian format "0,00" is equivalent to "0.00" for US.
Does XlsIO support only US formats? Or is there a way to set the culture?
thanks,
Stefano
MW
Melba Winshia
Syncfusion Team
January 2, 2007 01:37 PM UTC
Hi Stefano,
Please accept my apologies for the delay in getting back to you. Essential XlsIO support only US formats. But it will preserve all the culture settings. Please let me know if you have any other questions.
Thanks,
Melba
KP
Keyur Patel
May 25, 2007 05:38 PM UTC
I am having this same problem. Are you going to add a feature that allows non-US formats?
I try to set the NumberFormat to this: "#.##0,00",
and XlsIO automatically changes this in the Excel file to: "#,##000"
How do I get the proper number group (i.e. thousand) separator into the number format?
>Hi Stefano,
Please accept my apologies for the delay in getting back to you. Essential XlsIO support only US formats. But it will preserve all the culture settings. Please let me know if you have any other questions.
Thanks,
Melba
AJ
Ajish
Syncfusion Team
May 26, 2007 12:54 AM UTC
Hi Keyur,
I am not sure if I understand your requirements correctly but here is a sample based on my understanding
http://www.syncfusion.com/Support/user/uploads/Globalization_8ff94d88.zipIn this sample the currency symbol is extracted from the culture info object and then used to construct the NumberFormat string. Please let me know if you have any questions.
Regards,
Ajish.
KP
Keyur Patel
May 29, 2007 04:12 PM UTC
I looked at your sample, and tried exactly what you said. I set the number format like you indicated:
sheet.Range["A1"].NumberFormat = "[$" + currencySymbol + "-411]#.##0,00";
However, when I open the Excel file, the number format has changed to:
"[$€-411]#.##0,00000"
And, the number is not formatted with the "." number group separator. The number in Excel appears like this:
€1396407,75652
I am running Syncfusion version 4.2.0.37
My regional settings in Windows has been set to German (Germany).
KP
Keyur Patel
May 29, 2007 04:17 PM UTC
Also, I noticed that if I just set the number format using USA standards, then the Excel file is formatted properly when I open it in another locale (e.g. Germany).
I only did this:
sheet.Range["A1"].NumberFormat = "#,##0.00 [$€-407]";
This seems to work.
AJ
Ajish
Syncfusion Team
May 29, 2007 06:07 PM UTC
Hi Keyur,
Thank you for the update. Glad to hear that the problem has been resolved.
Regards,
Ajish.