Need to delete rows from excel

Hi Team,

By keeping headers i want to delete all the rows whatever the range will be, i tried using delete range and clear content activity but didn’t get what i need to be.

can you please guide me how i can delete all content from range A2.

Generally i do it manually by selelcting A2 cell and used Ctrl+Shft+End and then Delete. i want to get it done by Robot

1 Like

Hi @omkard222

use excel application scope and use select range and then use send hot key as ctrl+shift+end and delete

Thanks
Ashwin S

@omkard222

  1. First use Read Range activity to read the data from excel file and it will give output as DataTable and say inputDT.

  2. And then use Insert/Delete Rows activity to delete rows and specify below values.

NoRows - inputDT.Rows.Count
Position - 2
ChangeMode - Remove
Sheet Name - “SheetName”

5 Likes

Hi @omkard222

use excel application scope and use select range and then use send hot key as ctrl+shift+end and delete

Thanks
Ashwin S

ok let me try this way

1 Like

hi Ashwin,

the range is not specific hence Im not able to specify the range, all i want is delete the rows from A2 to till whatever rows are available

Hi Lakshman,

Thank you so much it works… :slight_smile:

1 Like

@omkard222

Glad to help you. Happy Automation :slight_smile:

Could you please close this thread by marking above my post as solution.

Hi Ashwin,

Is possible for you to provide simple workflow? regarding same which you have explain

It is use that read range activity

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