How to filter and remove the excel data without removing formulas

Need to filter data in excel sheet and and remove those rows in excel sheet.

I tried with filtering data table and pasting it in same sheet. But the existing formulas in the cells are getting removed.
Requirement is when apply filter in excel sheet formulas should not be removed.

Would someone please propose some ideas on this issue.

Hello,

Read Range from Excel gets the values and not the formula, therefore you cannot write the formulars to the excel because you do not know them.
One option would be to use “Filter Table” activity with “Create Table” Activity before:
Link to forum entry

1 Like

Hi @juliaF,

Thanks this one works well.

Another help, Is it possible to remove the filtered data in excel without removing formulas?

1 Like

Hello,

I’m not sure if you can do it with the UiPath Excel Activities. Without testing, I can think of two ways which could work:

  1. Create a column which contains the formular as text, get the whole table with read range, then filter in the datatable with the actual values and write to excel again (using the formulars)
  2. filter as said in my previous post, then copy the filtered data from one sheet to another

@juliaF,

Yes, Let me try with the option one.

In second option if we copy the sheet then entire sheet data is getting copied. I tried and it is not working as expected.

Thanks for your help :slightly_smiling_face:

Another solution would be to delete the filtered data with a VBA-Code and just run that one on the Sheet with “Invoke VBA”

in the below package, you have an activity called remove filter. it helps you.

Regards
Balamurugan.S

Yes @juliaF. I tried by invoking VBA and it worked well.

Thanks for your help :slight_smile:

Hi @balupad14,

Thanks for sharing. I will explore your package and will use it :slight_smile:

1 Like

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