Hello,
I want to delete last row. (delete row that column Round and Type = blank )
Please guide me about it.
Hello,
I want to delete last row. (delete row that column Round and Type = blank )
Please guide me about it.
Hi @Stef_99
Use the read range workbook activity and store the data in a data table variable and then use REMOVE DATAROW ACTIVITY where for last row mention RowIndex as dt.Rows.Count-1
Regards
Hello @Stef_99 ,
Use the Filter Datatable activity and apply the conditions according to your requirements. This should work.
Dim rowToRemove = (From row In dataTable.AsEnumerable()
Where String.IsNullOrEmpty(row.Field(Of String)("Round")) AndAlso
String.IsNullOrEmpty(row.Field(Of String)("Type"))
Select row).LastOrDefault()
If rowToRemove IsNot Nothing Then
dataTable.Rows.Remove(rowToRemove)
End If
Use read range activity first to store the data in datatable,
then use remove datarow activity to remove the required column
Row index as data.Rows.Count-1
hello @Stef_99 ,
Initially take ’
rowCount = dt.Rows.Count
dt is your datatable
then
dt = dt.AsEnumerable().Take(rowCount - 1).CopyToDataTable()
Regards,
Dheerandra Vishwakarma
@Dheerendra_vishwakarma @Shravan_Pintu Is solution by delete row in excel?
@Stef_99 yes you can do by reading your excel as a datatable…
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.