Build 4.0.0.77 of xlsgen exposes table auto-filters in the object model. So beginning with this build, it's possible to either create or edit existing auto-filters in tables, and write them back in XLSX and XLSB files, thanks to the
AutoFilter
member exposed in the table results
interface.
So here is how it works :
IXlsWorksheet worksheet = workbook.WorksheetByIndex[1];
// get the first tableIXlsTable t = worksheet.Tables.Item[1];
// edit the filter in the second column of the tablet.DataResults.AutoFilter.CustomFilter[2].CustomExpression = "> 2";
// remove the filter in the third column of the tablet.DataResults.AutoFilter.CustomFilter[3].Delete();