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:
54 063,42
-60070,47
-1173,12
-38574,00
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
I was attached sheet1 right, Sheet1 was pivot table and sheet 2 was normal excel
My requirment was, i have to check sheet1 column2 sum and sheet 2 columnn10
was having same or not.