Delete data row from excel table without column reference

excel
uiautomation
studio

#1

Hello to all,
I wanted to ask you if any of you could help me with my problem;

I have an excel table, in which there are some lines that I would like to eliminate, but the problem lies in the fact that these lines do not have a reference column.

so I do not know how to eliminate them.

I would be very grateful for one hand. thank you


#2

Hi,

are you trying to delete based on a specific phrase or value?

Thanks,

Tim


#3

based on a sentence


#4

a quick way would be to use 2 for each activities -
The first to retreive all rows that have the sentence in
dataRows variable type = System.Collections.Generic.List<System.Data.DataRow>

For each Column
Assign dataRows = datatable.AsEnumerable().Where(Function(row) row.Item(item.ToString).ToString()=“Hello”).ToList()

Replace hello with the sentence

Then use a for each to remove those rows
For each Row
Remove data row