This project has moved and is read-only. For the latest updates, please go here.

Cell formating

Jun 24, 2013 at 8:33 PM
May I know how can I convert a decimal (eg: 33.3333333333333,100,50) to percent format.
I have tried with this code:

ws.Cells[1,1].Value = 33.3333333333333;
ws.Cells[1.1].Style.Numberformat.Format = "0.00%";

But this give me 33% instead of 3333.33%
Also i would like to see the values 100.00% & 50.00% respectively.
Jun 27, 2013 at 5:49 AM
Try

ws.Cells[1,1].Value = 33.3333333333333;
ws.Cells[1,1].Style.Numberformat.Format = "#0.00%";

:)