I had a two excel files, I need to sum according to the column name in which is having both Negative values and postive values. For Eample like this:
if have used below query using linq :dt.AsEnumerable.Sum(Function(x) If(IsNumeric(x(“Column2”).ToString.Trim),CDbl(x(“Column2”).ToString.Trim),0))
I am getting error like this:
I try to convert to int but i getting error like input string was not in correct format
please help me out for solution
Thanks in advance.