Search code examples
c#.netexcelepplus

EPPlus: Creating Sort Columns


I am trying to create an excel spreadsheet like so in EPPlus:

Desired Output

My main trouble stem from getting the drop down to appear. I understand this can be easily done in desktop Excel by selecting the Data -> Filter tool.

Is there any way to achieve this result using EPPlus? (Or any other built in .NET method)


Solution

  • I achived this result using the following line of code:

    ws.Cells[$"A{row}:S{row}"].AutoFilter = true;