How to subtract 2 columns

how to subtract 2 column data and print that in beside column
what is the expression for that?
how to subtract

@anjani_priya

For Each row As DataRow In dt.Rows
    row("Result") = Convert.ToDouble(row("Column1")) - Convert.ToDouble(row("Column2"))

Subtract.xaml (11.3 KB)
Refer this workflow

in which activity should I write this

You can use the “Invoke Code” activity
The “Invoke Code” activity allows you to write custom code directly in your workflow.

can you send sample code
how to write that after invoke method

the values are in double
can you tell how to convert them
Book1.xlsx (8.8 KB)
sample excel

Subtract.xaml (9.7 KB)
refer this


error

can u show ur varibale panel

Hi @anjani_priya

- Read Range (Input: Excel File, Output: DataTable)
- Add Data Column (Name: Result)
- For Each Row (Input: DataTable)
    - Assign (Left: row("Result"), Right: CDbl(row("Amount(in RS)")) - CDbl(row("Closing Debit")))
- Write Range (Input: Modified DataTable, Output: Excel File)

Hope it helps!!

image
output


Capture44
error

@anjani_priya

BlankProcess4.zip (201.1 KB)
Found Solution in Sequence3.xaml


error

I suggest u to create a workflow and then run the workflow ,i think you r running directly from download

how I can I round off the values?

can you eloborate your requirement @anjani_priya