On 13/05/2013 07:24, Jim Talbut wrote:
Hi,

What should the XSSFName.BUILTIN_FILTER_DB named range refer to?

I've been using the following code to set up an auto-filter:
CellRangeAddress wholeTable = new CellRangeAddress(startRow, endDetailsRow, startCol, state.colNum - 1);
            state.currentSheet.setAutoFilter(wholeTable);

And I've noticed that the resultant XSSFName.BUILTIN_FILTER_DB refers to the top few rows of the table, not either the whole table or just the first row. The auto-filters work, but I'm confused about the name (and it means I can't write a unit test for my use of auto filters).

For the benefit of anyone else having the same problem:
XSSFName.BUILTIN_FILTER_DB or "_xlnm._FilterDatabase" should refer to the entire table being filtered - I had got my call to setAutoFilter wrong.

Interestingly Excel displayed the right thing even though the name was wildly out.

Jim


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to