cancel
Showing results for 
Search instead for 
Did you mean: 

Add criteria to auto filter blue prism

poojagupta83
Level 4

I am trying to filter a column in the excel file using action - "Add criteria to auto filter blue prism". It is one of the actions in MS Excel VBO - Extended Digital Exchnage. I need the criteria to be able to filter any value greater than zero. I am able to just provide a value with this criteria here. for example, if I set criteria to zero, it will filter the excel with value zero for that column. But I need to filter on anything gretaer than zero so that all negative or zero values are eliminated. Is there a way to give different value to criteria. Please suggest.

1 BEST ANSWER

Helpful Answers

Hello @poojagupta83,

Auto Filter in Blue Prism’s MS Excel VBO (including the Extended version) is limited when it comes to using conditions like greater than ( > ) or less than ( < ) for numeric filtering. The “Add Criteria to Auto Filter” action primarily works for exact match filtering or basic text wildcards (like *keyword*), but unfortunately, it doesn’t support operators like >0 directly — this is a limitation of how AutoFilter criteria are passed through the VBO actions.

However, you can definitely achieve this using a Code Stage with VB.NET, where you can access Excel’s full object model via Interop and apply filters with conditions like >0 without any restrictions. This approach offers much more flexibility and keeps everything within Blue Prism without needing external macros.

If you’d like, I can share a sample Code Stage snippet you can directly use to apply the greater than zero filter in your process. Just let me know!

 

Best regards,
Sourav S
Consultant - Automation Developer
WonderBotz

View answer in original post

10 REPLIES 10

Hello @poojagupta83,

Auto Filter in Blue Prism’s MS Excel VBO (including the Extended version) is limited when it comes to using conditions like greater than ( > ) or less than ( < ) for numeric filtering. The “Add Criteria to Auto Filter” action primarily works for exact match filtering or basic text wildcards (like *keyword*), but unfortunately, it doesn’t support operators like >0 directly — this is a limitation of how AutoFilter criteria are passed through the VBO actions.

However, you can definitely achieve this using a Code Stage with VB.NET, where you can access Excel’s full object model via Interop and apply filters with conditions like >0 without any restrictions. This approach offers much more flexibility and keeps everything within Blue Prism without needing external macros.

If you’d like, I can share a sample Code Stage snippet you can directly use to apply the greater than zero filter in your process. Just let me know!

 

Best regards,
Sourav S
Consultant - Automation Developer
WonderBotz

poojagupta83
Level 4

Hi Sourav,

Thanks for responding. It will be helpful if you can share the sample Code Stage snippet.

Pooja

Nandhakumar
Verified Partner

Hi @poojagupta83 

Plase find the details below, i have tested for both >0, <0 conditions,

Nandhakumar_0-1752632427852.png

Columnindex = the column number which you are trying to apply the filter(Like ColumnA =1)

Range can be A1 as we have the headers in first row always, incase you need to filter only specific range that you can provide as well (A1:F10)

filtercriteria - you can provide >,<,= (you can test for other if you want to try)

 

Nandhakumar_1-1752632464592.png

Add the action into your MS Excel VBO to use it.

Try and let me know, if it works for you.

Thanks,

Nandha

Hi @poojagupta83,

Try the code and approach that have been provided above. It should work; if not, we can dive deeper.

 

Best regards,
Sourav S
Consultant - Automation Developer
WonderBotz

Hi, 

I am getting internal error - The > operation must have 2 operands.

Below are the screen shots of my code.

poojagupta83_0-1752677007756.png

poojagupta83_1-1752677028286.pngpoojagupta83_2-1752677043312.jpeg

Can u pls suggest.

 

Hi @poojagupta83 ,

As i can see that you are giving the value to filtercriteria without "", its a text data type. also you need to provide the Range value as per your header row in the file. "A1" if the first row is header.

Try this and let me know if you are able to solve it.

Thanks,

Nandha

Hi Nandha,

I made the changes that you suggested. I am getting issues with Range now. I have attached the necessary screen shots. I am not sure if I am missing any library here. Please advise.

poojagupta83_0-1752768145186.pngpoojagupta83_1-1752768156710.pngpoojagupta83_2-1752768173685.png

 

Hi @poojagupta83 ,

can you pls provide the screenshot of the excel file you are trying to filter if possible?

Can i understand the range you have provided is V5 meaning your headers in 5th row of your input file? i think you are confusing the range with column index. you have provided column index as 22 which column v then range also you have provided range as V1. 

Range:

If your headers in first row give the value as A1.

Thanks,

Nandha

Giving the Range "A1" worked for me. Thanks a lot for helping with this.