Filter Data Table activity deletes cells

Hey guys!

Currently I am automating a process in Excel with the filter data table activity. I read the Excel sheet in with read range and stored in a variable with like 500 rows. Now i ran the process and opened the Excel afterwards but the cells I outfiltered got deleted which is not what I wanted. I need it the way you would have it manually that the cells get hidden. I used the filter manually as well and I got an other result when I do it through running the process. The manual result is the right one but it is the same formula/filter. Is it because of the keep and remove? If so, is there another solution?
Here a screenshot:

I hope you can help me out :blush:

so you can do like this use:

  1. Read range whole table
  2. Use For each row in DT - in properties set output which contain an index of the current row (remember that excel is counting from 1, not 0 so do -1 if your DT has headers then also -1 or tick in read range has headers)
  3. read the value of the cell by cint(item.row(“name of column”)) - set type of assign to int32
  4. Add if statement with condition Var >= 20000 AND Var <= -20000 if both conditions have to meet if one of them then use OR.
  5. In then use this
    Hide and Unhide Activity in Uipath - YouTube
    its activity for hiding rows.

Now your execl will hide data.

1 Like

Hi @achalisma

You can use invoke VBA activity for this… thanks

@Mikolaj_Zielinski Thanks for answering.

Well I can’t use the BalaReva package in my department so that probably is not the solution. Any other idea? :smiley:

@prasath_S Thanks for answering.
I don’t know anything about VBA to be honest. Any other idea? :sweat_smile:

Writing the VBA macros for this would be the more feasible way from what I know, thanks

Here
https://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Hide-Excel-Row-and-Column-in-C-VB.NET.html

Well since I’m not into VBA I can cut this solution :sweat_smile: