Hi,
How to get the sum of specific rows, below is my input
and i want output as below
Check this out:
Try this expression
(From d in dtData.AsEnumerable Where Not (isNothing(d(1)) OrElse String.IsNullorEmpty(d(1).toString.Trim)) Select v = CDbl(d(1).toString.Trim)).Sum(Function (x) x)
d(1) → ColumnNameOrIndezx
Regards
Gokul
yes, it is fixed
Hi Gokul,
Thanks for your reply, but how do i mention the column name? please check the below expression and let me know and also please tell me the type of varibale?
(From d in Summary1.AsEnumerable Where Not (isNothing(d(“GL Code mapping”)) OrElse String.IsNullorEmpty(d(“R10”).toString.Trim)) Select v = CDbl(d(“R11”).toString.Trim)).Sum(Function (x) x)
See below is my excel sheet and column name is GL code mapping but i want the sum of revenue from operations and other income row…
Hi Gokul,
Please reply on this.
Thanks in advance
Hi @bhanu.priya2,
You can directly use a write cell activity in the desired cell and pass the excel formula in write cell activity value part like “=SUM(A1,A2)” example.
Thanks
Hi @bhanu.priya2,
You can also use Lookup Datatable in order to store the values as variables, sum them and then write the result with write cell in the desired cell.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.