To find Sum of Rows and get the value in new column Line items


I have an excel file with contain six columns. I need to find sum the columns as Integrated Tax(₹)+ Central Tax(₹) + State/UT Tax(₹) …the sum of value will come in total tax amount columns (C+D+E) Result will come in F … how will achieve this by LINQ…?
Sum.xlsx (9.6 KB)

dt = dt.AsEnumerable.Select(Function(r) dt.Clone.LoadDataRow({r(C),r(D),r(E),Now.Millisecond},False)).CopyToDataTable()

please try this



For Each row As datarow In dt.AsEnumerable

try this pass the expreesion in the invokecode activity


@Balachander_Pandian dt_excel.Clone.LoadDataRow({x(0),x(1),x(2),x(3),x(4),cint(x(2))+CInt(x(3))+CInt(x(4))},False)).CopyToDataTable

Main.xaml (7.5 KB)

Hope this helps

Hi @Shiva_Nikhil Thank you… Code is run successfully but unable to see the output. Please advise me

1 Like


for the output you need to change the argument as in/out

use write range workbook activity to write back to excel


hi @Shiva_Nikhil Thank you… It works now

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