Row data from decimal to percentage

Hello all,

I am using a for each row to go through a list of numbers in an excel file. However for some reason it comes out as a decimal instead of a percentage.

row(“difference”).tostring = 0.0508

the outcome I would like is = 5.08%

Would someone be able to help me produce this outcome?

Hi @dvn :wave:

Try this workflow: GetPercentageFromDT.xaml (6.7 KB)

Let me know if you are facing any issues.

Cheers!

Hi @dvn,
Try this below steps:
Are u using this process in excel? If u r using excel means follow the steps given below…
Hope these steps would help you resolve this

  1. use a excel application scope and pass the file path as input
  2. In the scope use a Read Range activity and get the output with a variable of type datatable named dt
  3. Then use a for each row loop and pass the above variable as input
  4. Inside the loop use a assign activity like
    Differencesvalue=row.item(“YourcolumnName”).tostring
    Decimal Type(YourVariable)=Convert.ToDecimal(Differencesvalue)
    5.Check Using message box (YourVariable).ToString(“P”)
    For your references check below worKflow hope this helps, if it works mark as solution.
    ConvertPercentage.xaml (7.4 KB)

Regards,
Neelima.