Delete an entire row in excel

I have an excel sheet in which i need to delete the contents of an entire row.I couldn’t find an activity to do this? Can you guys help me? Is there any custom activity available, if so how can i get it??

Thanks in Advance :slight_smile:

You can use this activity

BalaReva.Datatable.Activities package

Or you can use write range and give a specific range to replace with empty data

Or you can use read range to get a data table then remove or filter row and Write it another excel

Thanks,
Prankur

How/where can i get this package?

Manage Packages

Can’t seem to find it. Do i need to get it from anywhere??

Hi,

You want to delete the contents of the row or you want to delete the entire row?

If you want to delete the contents then simply use the write range or write cell activities and pass the empty value. i.e in data table value place " "

Thanks

Hi @im_heathen,

Please follow below points to achieve the row deletion task :

  1. Read the excel data into a datatable.
  2. Read the datatable using for each row activity.
  3. Put if condition for those rows which you want to delete in excel
  4. Add the Remove Data Row activity based on your condition.
  5. In the last overwrite the excel file with filtered datatable.

Hope this will help you!

Thank you,
Anuj

Daily Trend Template - Copy.xlsx (21.7 KB)
So, this is the excel i need to modify, initially 8 rows of data will be their for 2 tables, i need to select the last 7 rows and paste it in the 1st row and remove the duplicate 8th row contents only not the row itself. How to achieve this?

Hi

I can see the last 7 rows are empty in the excel that you have provided to me. Could you please brief more about ?

Thanks

Leave the empty rows im talking only abt rows with data.

OK

so if you want to remove the last row of first table then use write cell activity.

In write cell mention the range as “C11:E11” and value as " " .

Same applicable for the second table as well. Try and let me know if there is any gap.

Thanks

Use Excel Application Scope
Inside the Excel Application Scope,

  1. use the Select Range Activity, - Range Argument Pass the row you want delete, for example if you want delete row number 2 then pass like “2:2”.
  2. then send hot key “Del”, - if you want to delete contents
    (3. then send hot key “Ctrl -” (Control Minus), - if you want to take way that entire row)
1 Like