This project has moved. For the latest updates, please go here.

Percent Format

Aug 21, 2012 at 5: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%

Editor
Aug 21, 2012 at 2:03 PM

Try this...

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

Aug 22, 2012 at 12:34 AM

Thanks so much!! It works just fine :)