two columns has double data type values how to subtract them and add a new column beside of that and enter the values in that column
Read Range (Output: dt)
For Each Row (Input: dt)
Assign: row("Result") = CDbl(row("Column1")) - CDbl(row("Column2"))
Write Range (Input: dt)
Hope it helps!!
HI,
Can you try as the following?
dt.Columns("sub").Expression = "Convert([Column1],System.Double)-Convert([Column2],System.Double)"
Please modify column name for your datatable.
Regards,
Should I " " in the right side of assign?
Yes, as the above screenshot.
Can you share screenshot of your expression?
@anjani_priya
Can you share the sample input excel
Book1.xlsx (8.8 KB)
this is the sample
at c column the subtraction should reflect
- 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!!
@anjani_priya
BlankProcess4.zip (201.1 KB)
Found Solution in sequence3.xaml
Did you run the sample as it is?
If not, there might be invalid double data in your datatable.
Regards,
Book1.xlsx (10.3 KB)
check you once check for this sheet?
@anjani_priya
Try by updating the package or by Restarting your system
i have changed the data once check







