Delete all rows containing asterisks in Excel

Dear All,

I need to delete all rows containing the Asterisks shown in the screen shot attached. Please note that the row number where these asterisks appear is not always the same, instead the column is always the same (B). This will have to be done within Excel Application Scope. Do you have any suggestions? Please note that there is one row that contains 2 asterisks instead of just one. Many thanks! Fabio

Hi @Fabio_Di_Turi

try out this syntax

              From row  in Input_DT
              where row("1").ToString <> "*"
              select row

use the above syntax in assign activity
Out_DT is type of DataTable variable


hI @Fabio_Di_Turi

Try the following expression and write the values in the new sheet

dt.AsEnumerable().Where(Function(r) r(1)<>"*")).CopyToDataTable

Hope this Helps


Try this one

dt2.AsEnumerable().Where(Function(r) r(1).ToString<>"*" And r(1).ToString<>"**" ).CopyToDataTable

if in case you have multiple * in the column 1

You can use this expression

dt2.AsEnumerable().Where(Function(r) r(1).ToString="").CopyToDataTable

Hope this helps


Again with all the code…

You can use the filter data table activity, and with it remove all the rows with * in it:


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.