How to format decimal numbers as percentage in excel using epplus?

Pandiyan Cool picture Pandiyan Cool · May 3, 2015 · Viewed 9.3k times · Source

I'm using following code to format decimal number as percentage in excel using Epplus. I have used this example.

sheet.Cells["B:B"].Style.Numberformat.Format = "#0\\.00%";

The number is looking normal in sheets, but in edit bar number is looking different.

The number 9.47% is showing as 947 in edit bar.

Check the image for problem sample. How to resolve this?

enter image description here

Answer

Jordan Biserkov picture Jordan Biserkov · May 3, 2015

Short answer: divide the numbers by 100 and use the following custom format 0.00%