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
Cheers
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
Cheers
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?
- Read that excel file (Workbook or Excel Activities)… ( dt_Sheet)
2.Use Assign Activity
columnData
asList(Of String)
= dtSheet.AsEnumerable().Select(Function(row) row(“YourColumnName”).ToString()).ToList()
where is list(of string) data type
In the variable panel after naming the variable go to Browse for types
System.Collections.Generic.list
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.