We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Percentage format of an value from C# Object

Hi All,

I need a clarification regarding the percentage format of an value in C# object.

It is posible to format a value to %.


I need to format the value 20 as 20%. The value 20 is stored in Equipment object Collection. I loop through all the equipments and format all the discount value as % format.

How can i do this?


Vijay Muthiah


When you talk about 20%, the original number will be .20.

For case I think you want to concatenate a percentage symbol with your number(20).

You may try:

Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook();
Aspose.Cells.Worksheet ws = wb.Worksheets[0];
int num = 20;
ws.Cells[0,0].PutValue(num + "%");

Thank you.