Excel logic to print values

Hi All,


i want to find the percentage of each row and write in column “Total”.(1000/10=100)

looking for logic


  1. use Read Range activity to read the data from excel file and it will give output as DataTable. Let’s say ‘InputDT’.

  2. And then use For Each Row activity to iterate one by one row from DataTable.

        For Each Row in InputDT
             row("Total") = Cint(row("Amount").ToString)/Cint(row("Percent").ToString)
  3. And then use Write Range activity and pass ‘InputDT’ to write into Excel file.

1 Like


Check as below

Use Read Range to read into a DT variable
Use For Each Row activity and give the DT variable
Create an Index variable from the properties of For Each row activity
Inside the For Each place Assign activity and write as below

> dtvariable.Rows(IndexVariable).Item(“Total”) = Cint(row(“Amount”).ToString) / Cint(row(“Percent”).ToString)

For your reference you can check as below


Hope this may help you


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.