How to get the value in the particular cell dynamically

I have one doubt
in a excel file, there are 22 sheets
the 21 sheets data should sum and should enter in summary sheet
while iam reading the sheets, the summary sheet is also reading how can i ignore that sheet

how to ignore particular sheet


In For each excel sheet Use if condition in that Currentsheet.contains(“Summary”) in that perform your necessary actions

I want to ignore the summary sheet


In then block leave it empty and else block perform your actions

total value column is there but again its showing like total value column is not present


Use if condition and if the is the name of summay then dont do sum

Did you give Total Stock? I see you have value instead


the total value column should be sum

iam getting this error.


Try to use the formula like this

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


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