I am having an excel file with single column data with no header and I need to extract the last value from the excel file.
Any suggestions would be helpful.
Thanks.
Nawaz.
I am having an excel file with single column data with no header and I need to extract the last value from the excel file.
Any suggestions would be helpful.
Thanks.
Nawaz.
use read range activity without headers
dt.rows(dt.rows.count-1).item(0) this will give you the last value
Please use an assign activity:
leftside: LastRow (DataType is DataRow)
right side:
YourDatatableVar.AsEnumeration.Last()
or
YourDatatableVar.Rows(YourDatatableVar.Rows.Count-1)
Thanks.
And I am passing datarow as string I need a sing value
It should be
st.rows(st.rows.count-1).item(0)
i think you missed .rows
YourDataTable.AsEnumerable.Last()(0).toString
datarow variable should be string type and in value also convert to string
dt.rows(dt.rows.count-1).item(0).ToString
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.