Continuing the discussion from I want the below value on division but unable to get:
if you want to get the first and last row ,Use the below expression
Dt.asenumerable.first
dt.asenumerable.last
or you want to get particular column value of the first row and last row
Dt.rows(0).item(“columnName”)
Dt.rows(dt.rows.count-1).item(“ColumnName”)
I got the records for first and last row but how to write it back to excel
I am getting two different values for first and last row with different in datarow but cant use write range activity for that
for single values you can use write cell activity
or can you explain more about your requirement
you can copy both in to one datatable and write
or write each row separately as well
or you can do this which will get only first and last into one table
requireddt = dt.AsEnumerable.Where(function(x,i) i=0 or i=dt.RowCount-1).CopyToDatatable
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.