Hello,
I am trying to multiply column “A” with 50 and write the result in “Result” Column.
With the total of the Result .
can any one help me how i can do that with LINQ Query
Thank you
Hello,
I am trying to multiply column “A” with 50 and write the result in “Result” Column.
With the total of the Result .
can any one help me how i can do that with LINQ Query
Thank you
Hey @coder
Please find the demo below,
nmnithinkrishna_AddInUpdateXLCol.zip (9.7 KB)
Hope that helps.
Thanks
#nK
Thank you @AshwinS2
Thank you @Nithinkrishna
Cool @coder
@Nithinkrishna could you please explain to me what you are doing in the assign?
Thank you
Could you please show me the snap to check which Assign you are saying ?
@Nithinkrishna Sure,
`
dt_Data.AsEnumerable.Select(Function(row) dt_DataCopy.Rows.Add(row.ItemArray.Take(dt_Data.ColumnCount - 1).ToArray.Concat(if(String.IsNullOrEmpty(row(“A”).ToString.Trim),{string.Empty},{CStr(CInt(row(“A”).ToString)*50)})).ToArray)).CopyToDataTable
And this
dt_DataCopy.Rows(dt_Data.RowCount-1).Item(dt_Data.ColumnCount-1)
=
dt_DataCopy.AsEnumerable.Select(Function(row) CInt(if(String.IsNullOrEmpty(row.ItemArray.Last().ToString),0,row.ItemArray.Last))).Sum
Okay in the first Assign we are recreating the Data Table by updating the output column with calculation.
Second assign is to update the total value of it in the last row last column.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.