1

I am working on the autofilter option in aspose cells for java .

AutoFilter autoFilter = worksheet.getAutoFilter();
autoFilter.setRange("A1:D1");
autoFilter.filter(1, "Student");

This is working fine. But for the 3rd column I want to filter with "contains" option . In excel we can click on text filter and click on contains option, then we can filter with the text which contains some sub text. For example if I want to filter all the text which contains "school" : (result might be like aaa school, bbb school, xxx school etc) How can I do that in aspose cells for java?

Sowmya
  • 453
  • 1
  • 5
  • 18

1 Answers1

1

See the following sample code for your reference:

AutoFilter autoFilter = worksheet.getAutoFilter();

autoFilter.setRange("A1:D1");

autoFilter.custom(1, FilterOperatorType.EQUAL, "*school*");

autoFilter.refresh();

........

I am working as Support developer/ Evangelist at Aspose.

Amjad Sahi
  • 1,813
  • 1
  • 10
  • 15