How to do sum of values for the entire column of different sheets

how to do sum of values for entire column and for different sheets and enter the values at the main sheet linely


Please try this

Dt.AsEnumerable.Sum(function(x) If(IsNumeric(x("ColumnName").ToString), CDBL(x("ColumnName").ToString),0)).ToString


Iam getting an error
I shared shared the error to you can you check that


I saw the error that is when I added an if condition to check for numeric and then get sum


hi @anjani_priya

sumOfColumn = columnData.Where(Function(x) Not String.IsNullOrEmpty(x.ToString)).Select(Function(x) Double.Parse(x.ToString)).Sum()

how to take a particular column in a sheet?


  1. Read that excel file (Workbook or Excel Activities)… ( dt_Sheet)
    2.Use Assign Activity
    columnData as List(Of String)= dtSheet.AsEnumerable().Select(Function(row) row(“YourColumnName”).ToString()).ToList()

where is list(of string) data type

getting an error


In the variable panel after naming the variable go to Browse for types


yes I have got but iam getting an error
I want to append 21 sheets

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