Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

like image 717
Beshoy Hanna Avatar asked Feb 08 '23 03:02

Beshoy Hanna


1 Answers

I achived this result using the following line of code:

ws.Cells[$"A{row}:S{row}"].AutoFilter = true;
like image 80
Beshoy Hanna Avatar answered Feb 13 '23 22:02

Beshoy Hanna