AutoFilter doesn't apply

Hello,

I recently came into an issue as described here.

after running the code:

AutoFilter autoFilter = xlsxProcessor.createFiltersOnRange(sheetNumber, rowNum, startCol, endCol);

autoFilter.custom(COLUMNOFFSET + 1, FilterOperatorType.EQUAL, "unsatisfied", false, FilterOperatorType.EQUAL, "-");

autoFilter.refresh();

in XlsxProcessor:

	public AutoFilter createFiltersOnRange(int sheetNumber, int row, int startColumn, int endColumn) {
		AutoFilter autoFilter = workbook.getWorksheets().get(sheetNumber).getAutoFilter();
		autoFilter.setRange(row, startColumn, endColumn);
		return autoFilter;
	}

I am getting the result that looks like this:
image.png (1.7 KB)

I have to click OK to get the filter apply on the range
image.png (13.6 KB)
image.png (2.1 KB)

I’m using Aspose.Cells ver.18.4 and according to similar topics on forum this issue should have been fixed in even earlier versions.

Is it possible that in this case the problem is somewhere in the code?

BR

@nananam608,

We need your template file to evaluate your issue. Also, we are not sure about some objects/variables data you used in your provided code segment. We appreciate if you could create a standalone console Java program (runnable) to reproduce the issue on our end, we will check it soon.

As a side note, did you try using our latest version/fix (Aspose.Cells for Java v20.5.x)? Please note we have included many enhancements regarding certain MS Excel features in newer versions. So, it is worthwhile to give it a try to latest version.

PS. please zip your Excel file/attachments prior attaching here.