Cannot turnoff ListObject (table) AutoFilter Completely

How can we turn off AutoFilter completely on a ListObject (table)?

We have tried the following:

Workbook workbook = new Workbook("Demo.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
ListObject listObj = worksheet.ListObjects[0];
listObj.AutoFilter.ShowFilterButton = false;
workbook.Save("Demo2.xlsx");

As shown in the screenshot below, doing so would only turn off the Filter buttons, but it would not turn off AutoFilter completely (the “Filter” button remains pressed on the ribbon).

image.png (11.5 KB)

None of the following works, either:

listObj.AutoFilter.Range = null; 
listObj.AutoFilter.FilterColumns.Clear();

Demo.zip (7.2 KB)

@bingxie

To completely turn off the AutoFilter for a ListObject (table) in Aspose.Cells, you need to clear the filter settings and remove the AutoFilter from the ListObject. The code you provided only hides the filter buttons but does not disable the AutoFilter itself.

Here’s how you can do it:

Workbook workbook = new Workbook("Demo.xlsx");
Worksheet worksheet = workbook.getWorksheets().get(0);
ListObject listObj = worksheet.getListObjects().get(0);

// Clear any existing filters
listObj.getAutoFilter().filterColumns.clear();

// Remove the AutoFilter
listObj.setAutoFilter(null);

workbook.save("Demo2.xlsx");

This code clears any filters applied to the ListObject and then sets the AutoFilter to null, effectively turning it off completely. After running this code, the “Filter” button on the ribbon should no longer be active.

If you still encounter issues, please ensure that the ListObject is correctly referenced and that there are no other filters applied elsewhere in the workbook.

Neither works.

@bingxie
By testing with sample file and code on the latest version v25.10, we can reproduce the issue. ListObject cannot turnoff AutoFilter completely.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-59251

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@bingxie,

We are pleased to inform you that your issue (Ticket ID: “CELLSNET-59251”) has been resolved with priority. By default, the fix/enhancement will be included in the upcoming release (Aspose.Cells v25.11) that we plan to release in the first half (approximately between the 10th and 15th) of November 2025. You will be notified when the next version is published.