Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Issue: How to Filter on a Table? [7732]

$
0
0
The following works (but if I use "SetAutoFilter()" then the workbook is corrupt, I'll fix that). In the meantime just use "table.AutoFilter" instead: var wb = new XLWorkbook();
var ws = wb.Worksheets.Add("Sheet1");

ws.FirstCell().SetValue("Categories")
.CellBelow().SetValue("A")
.CellBelow().SetValue("B")
.CellBelow().SetValue("A")
.CellBelow().SetValue("B");
 
var table = ws.RangeUsed().CreateTable();
table.AutoFilter.Column(1).AddFilter("A");
Comments: I have the same issue... I can't set more than one filter. Do you have any solution about how can you set multiple filter?

Viewing all articles
Browse latest Browse all 1877

Trending Articles