First use a read range activity to retrieve the datatable from excel
Then can use Filter datatable activity and check if the row contains the words “No items returned” if so, then keep this row, if not, then delete that row
Then write it again to excel
Use a excel application scope and pass the filepath of excel
Inside the scope use a read range activity and get the datatable as dt
Now usually a merged cells can be read with read cell of the first merged cell
Use a READ CELL activity and mention as “A2” in cell property and get the string output as Strinput
So now use a IF condition like this
If true it goes to then block where we need to remove the cell with that text value as mentioned above and if it fails we can ignore without activity in Else block as we should not remove if it’s having only this record
But before that use a bother if condition in then block
With condition like this
If this is true it goes to then block where use a DELETE ROW activity but if fails it goes to else block where leave it as it is without any activity
Use the Excel Application Scope activity to open the Excel file that contains the row you want to delete. Specify the file path and the name of the sheet that contains the data.
Use the Read Range activity to read the data from the Excel sheet into a DataTable variable.
Use a For Each Row activity to loop through each row in the DataTable. Inside the loop, use an If activity to check if the current row meets the condition that you want to use to delete the row.
Condition : dt.Rows.Count>1
If the condition is true, use the Remove Data Row activity to delete the entire row from the DataTable. To do this, specify the Data Table variable, the current row index, and set the “Shift Positions” property to “True” to ensure that the remaining rows are shifted up to fill the gap.
After the loop has completed, use the Write Range activity to write the updated Data Table back to the Excel file. Specify the file path and sheet name, and set the “Add Headers” property to “True” if the Data Table contains column headers.
Use the “Close Workbook” activity to close the Excel file.
You can use “IF” Activity and Pass the Condition i.e. DT.RowCount>1 after reading the Data Table. If the Condition gets true use “Remove Data Row” workbook Activity and Pass 0 as Row index. That’s How you will remove the 1st Row.