You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/04/09 14:34:24 UTC
[Bug 56375] New: Autofilter : wrong definition created
_FilterDatabase built-in name in HSSFSheet.setAutoFilter()
https://issues.apache.org/bugzilla/show_bug.cgi?id=56375
Bug ID: 56375
Summary: Autofilter : wrong definition created _FilterDatabase
built-in name in HSSFSheet.setAutoFilter()
Product: POI
Version: unspecified
Hardware: PC
OS: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
Assignee: dev@poi.apache.org
Reporter: jrsirieix@free.fr
When setting autofilters on several tabs in a workbook, the _FilterDatabase
built-in name sometimes has a wrong definition, e.g. it points to another sheet
or no sheet at all. In that case, the filter dropdown buttons are present but
they do nothing.
I think the issue comes from the setAutoFilter() method in HSSFSheet, which
calls new Area3DPtg() with a sheetIndex whereas it seems to expect an
esternSheetIndex (line 2066 in v3.9):
Area3DPtg ptg = new Area3DPtg(range.getFirstRow(), range.getLastRow(),
range.getFirstColumn(), range.getLastColumn(),
false, false, false, false, sheetIndex);
I seem to have resolved the problem by replacing this line with the following:
short externSheetIndex =
_workbook.getWorkbook().checkExternSheet(sheetIndex);
Area3DPtg ptg = new Area3DPtg(range.getFirstRow(), range.getLastRow(),
range.getFirstColumn(), range.getLastColumn(),
false, false, false, false, externSheetIndex);
I have no simple code to reproduce the issue. Obviously it must happen when the
sheetIndex is different from the externSheetIndex.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 56375] Autofilter : wrong definition created _FilterDatabase
built-in name in HSSFSheet.setAutoFilter()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56375
jrsirieix@free.fr changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unspecified |3.9
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 56375] Autofilter : wrong definition created _FilterDatabase
built-in name in HSSFSheet.setAutoFilter()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56375
--- Comment #1 from jrsirieix@free.fr ---
In addition, in order for a POI-created autofilter to be like that of a
standard Excel file, the _FilterDatabase name should have be hidden (option
flag NameRecord.Option.OPT_HIDDEN_NAME = 0x0001 in addition to
NameRecord.Option.OPT_BUILTIN)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org