AutoFilters

AutoFilter1.jpg
AutoFilter2.jpg

            var wb = new XLWorkbook();
            var ws = wb.Worksheets.Add("AutoFilter");
            ws.Cell("A1").Value = "Names";
            ws.Cell("A2").Value = "John";
            ws.Cell("A3").Value = "Hank";
            ws.Cell("A4").Value = "Dagny";

            ws.RangeUsed().SetAutoFilter();
            
            // Your can turn off the autofilter with: worksheet.AutoFilter.Clear()

            wb.SaveAs("AutoFilter.xlsx");

Last edited Nov 8, 2011 at 4:11 AM by MDeLeon, version 4