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

Percent Format

Aug 21, 2012 at 6:59 AM

May I know how can I convert a decimal (eg: 33.33) to percent format.
I have tried with this code:

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

But this give me 33% instead of 33.33%

Aug 21, 2012 at 3:03 PM

Try this...

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

Aug 22, 2012 at 1:34 AM

Thanks so much!! It works just fine :)