Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Sep 08, 2017 8:12 pm

Hi,
I am using your free XLS libary for a small project for Excel-PDF conversion and i realy like it. But now i got stuck on a little problem.
Is there any way to set NumberFormat for the decimal seperator at chart tick labels? In my case it is a scatter chart. I am on a german system and the Numberformat is always with comma as decimal seperator (e.g. 0,001) but i want to let the user decide, irrespective of the current system culture. Any solution for that?

Timster
 
Posts: 2
Joined: Fri Sep 08, 2017 7:38 pm

Fri Sep 08, 2017 9:04 pm

Ok, after writing this post above and two evenings of searching, i gave it a n ew try and found the solution by setting a specific culture for the current thread.

for dots as decimal seperator:
Code: Select all
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
Workbook workbook = new Workbook();
workbook.LoadFromFile(...)
...


for comma as decimal seperator:
Code: Select all
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("de-DE");
Workbook workbook = new Workbook();
workbook.LoadFromFile(...)
...

Timster
 
Posts: 2
Joined: Fri Sep 08, 2017 7:38 pm

Mon Sep 11, 2017 1:27 am

Dear Timster,

Sorry for late reply as weekend and glad to hear that the issue has been resolved.
Please feel free to contact us if there is any question.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS

cron