Hi I use the below method to apply an AutoFilter :
public static void ApplyAutofilter(string fileName, string sheetName, string reference) {
Nice! this works! It helped me to solve my problem. Using the following made the difference
OpenXmlElement preceedingElement = GetPreceedingElement(worksheetPart); worksheetPart.Worksheet.InsertAfter(autoFilter, preceedingElement);