Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 324
Pandiyan Cool Avatar asked May 03 '15 10:05

Pandiyan Cool


1 Answers

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

like image 164
Jordan Biserkov Avatar answered Sep 19 '22 06:09

Jordan Biserkov