Stef_99
(Mary)
June 20, 2024, 4:03am
1
Hello, Now I use code as below.
dt.AsEnumerable().Where(Function (row) row(“ID”).tostring.Length < 5 or row(“ID”).tostring = “Test”).CopytoDatatable
IF I want to delete row that match condition in excel. (Exclude header)
Please guide me for solve it.
Thank you.
Hi @Stef_99
filteredDT = dt.AsEnumerable().Where(Function(row) row("ID").ToString.Length >= 5 AndAlso row("ID").ToString <> "Test").CopyToDataTable()
Stef_99
(Mary)
June 20, 2024, 4:11am
3
@pravallikapaluri How to delete data row in file excel?
@Stef_99
If you want to use linq query you need to write the result in another excel sheet.
Use delete rows activity in excel application scope in excel activities.
Hope it helps!!
1 Like
Stef_99
(Mary)
June 20, 2024, 4:16am
6
@pravallikapaluri I have question
How to delete row that column ID length >=5 or column ID = Test?
@Stef_99
If you want to delete the rows using excel activities. need to use macros code
1 Like
system
(system)
Closed
June 23, 2024, 4:18am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.