Custom filter

Hi,

I have defined 2 custom filters, equal is working, whereas GreaterThan, GreaterOrEqual, LessThan and LessOrEqual are not working… please advise



1. extractMirror.AutoFilter.Custom(3, FilterOperatorType.Equal, “11”);
this is working - gives results…

2. extractMirror.AutoFilter.Custom(3, FilterOperatorType.GreaterOrEqual, “11”);

this is not working - filter not applied. please advise.

Hi,


Thanks for your posting and using Aspose.Cells.

We were able to observe this issue and logged it in our database for investigation and for a fix.

This issue has been logged as

  • CELLSNET-45366 - Custom filter Equal is working whereas GreaterThan, GreaterOrEqual, LessThan and LessOrEqual are not working

Hi,


Thanks for using Aspose.Cells.

We have looked into this issue further and found, your problem might be occurring because of wrong data type. You are passing string as an argument, but you should pass integer instead.

So please change this line

extractMirror.AutoFilter.Custom(3, FilterOperatorType.GreaterOrEqual, “11”);

into

extractMirror.AutoFilter.Custom(3, FilterOperatorType.GreaterOrEqual, 11);

and it should fix your issue. Let us know your feedback.

I tried it, it doesn’t work for me, …

extractMirror.AutoFilter.Custom(3, FilterOperatorType.GreaterOrEqual, 11);

May be I need to apply number format to the excel column 3, how do I apply number format to a column?


Hi,


Thanks for your posting and using Aspose.Cells.

Please provide us your sample Excel file so that we could test the sample code with your provided Excel file. Please also provide us your sample code, it will also be helpful for us in replicating this issue at our end. Thanks for your cooperation in this regard and have a good day.