Link to home
Start Free TrialLog in
Avatar of shubham gupta
shubham gupta

asked on

culture issue in excel

How to resolve culture problem of decimal and thousand separator  of number of excel using c#
Avatar of Misha
Misha
Flag of Russian Federation image

Can you write more details about your porblem and provide some your code?
If you use Microsoft Interop Excel you can set separator programmatically.
 Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();
          string culture = System.Threading.Thread.CurrentThread.CurrentCulture.ToString();//"en-GB";
            CultureInfo ci = new CultureInfo(culture);
          app.DecimalSeparator = ci.NumberFormat.NumberDecimalSeparator;
                app.ThousandsSeparator = ci.NumberFormat.NumberGroupSeparator;

Open in new window

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.