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.

Thu Oct 09, 2014 8:43 am

Hi,

i have to format a cell in euro format, this means that the values must be . for thousand separator and , for decimal,
like: € 100.542,22

How i can do that?

thanks

Sintia
 
Posts: 11
Joined: Mon Sep 15, 2014 10:09 am

Thu Oct 09, 2014 9:47 am

Hello,

Thanks for your inquiry.
Our product is only able to set the cell format in invariant Culture. The following code is for your reference.
Code: Select all
CultureInfo cc = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Workbook book = new Workbook();
Worksheet sheet = book.CreateEmptySheet("format");
sheet.Range["A1"].Value = "100542.22";
sheet.Range["A1"].NumberFormat = "€ #,##0.00";
book.SaveToFile("FormatCell.xlsx", ExcelVersion.Version2010);
Thread.CurrentThread.CurrentCulture = cc;

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon Oct 13, 2014 9:18 am

Hello,

Has the issue been resolved? Could you please give us some feedback if convenience?

If there are any questions, welcome to get it back to us.
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Oct 16, 2014 9:41 am

Yes thanks a lot soo much,
its working great

Sintia
 
Posts: 11
Joined: Mon Sep 15, 2014 10:09 am

Wed Feb 25, 2015 6:45 am

Hello Sintia,

Please feel free to contact us if you have any questions.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.XLS

cron