You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Jim Talbut <jt...@spudsoft.co.uk> on 2013/05/13 08:24:53 UTC

What should XSSFName.BUILTIN_FILTER_DB refer to?

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).

Thanks.

Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: What should XSSFName.BUILTIN_FILTER_DB refer to?

Posted by Jim Talbut <jt...@spudsoft.co.uk>.
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org