Delete range Excel from specific cell onwards

Hello,

I would like everything below and including row 7 in Excel to be deleted, however the number of rows filled is dynamic.

I have attempted to configure the delete range activity with “A7:L5000” however as there are empty rows I get the error “The range does not exist”.

I have also attempted “A7:Z” but get the same error message.

Please advise how to configure to delete everything from row 7 in Excel downwards

Cheers

Hi @E.T.S

Can you try below

Excel.Sheet("Sheet1").Range("A3:D"+Excel.Sheet("Sheet1").DataTableValue.Rows.Count.ToString)

Cheers!!

@E.T.S

this should work I guess

"7-" + Excel.Sheet("Sheetname").RowCount.ToString

cheers

Hi,

Thanks for your reply,

I am using this activity for delete range:

Therefore the suggested method won’t work

Please could you advise how to configure

HI,

Thanks for your reply,

I am using an Excel application scope and a delete range activity like this:

Therefore this won’t work

Please could you advise how to configure

@E.T.S

If you are using classic then use "A3:D" + dt.RowCount.ToString

Cheers

Hi,

Thanks for your reply!

I am getting this error:

image

Hello,

Thank you everyone for your replies!

I have managed to figure out a way to overcome my issue:

1 Like

@E.T.S

Can you check what is the row count you are getting

Cheers

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