Why appending AutoFilter corrupts my excel file in this example?
This happens because of where you are writing the autoFilter element in the XML. I opened a file that I had run your code on and opened it in the Open XML Productivity Tool. This showed that the error was Looking at the ECMA-376 standard from here the XML for a Worksheet looks like this: … Read more